diff options
Diffstat (limited to '')
-rw-r--r-- | src/ft_rgb_to_hex.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ft_rgb_to_hex.c b/src/ft_rgb_to_hex.c new file mode 100644 index 0000000..525296d --- /dev/null +++ b/src/ft_rgb_to_hex.c @@ -0,0 +1,11 @@ +#include <cub3d.h> + +int + ft_rgb_to_hex(t_rgb rgb) +{ + int res; + + res = 0; + res += ((rgb.r << 16) + (rgb.g << 8) + rgb.b); + return (res); +} |