-
Notifications
You must be signed in to change notification settings - Fork 0
/
rgb.h
33 lines (27 loc) · 1.17 KB
/
rgb.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* rgb.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tdarchiv <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/02/23 16:29:51 by tdarchiv #+# #+# */
/* Updated: 2019/02/23 21:01:39 by tdarchiv ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef FRACTOL_RGB_H
# define FRACTOL_RGB_H
# include <stdint.h>
# define R_SHIFT (16u)
# define G_SHIFT (8u)
# define B_SHIFT (0u)
struct s_rgb
{
float r;
float g;
float b;
};
typedef struct s_rgb t_rgb;
t_rgb color_mix(float factor, t_rgb a, t_rgb b);
uint32_t rgb_pack(t_rgb rgb);
#endif