diff options
author | Rudy Bousset <rbousset@z2r4p3.le-101.fr> | 2020-02-04 20:17:21 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r4p3.le-101.fr> | 2020-02-04 20:17:21 +0100 |
commit | d74aa337b4260840afd8e6b1ab99acc29dc0e9d9 (patch) | |
tree | 62f0367ee063850f94f9fe62a8a8ba911ed5d89c /src/ft_rgb_to_hex.c | |
parent | useless change (diff) | |
download | 42-cub3d-d74aa337b4260840afd8e6b1ab99acc29dc0e9d9.tar.gz 42-cub3d-d74aa337b4260840afd8e6b1ab99acc29dc0e9d9.tar.bz2 42-cub3d-d74aa337b4260840afd8e6b1ab99acc29dc0e9d9.tar.xz 42-cub3d-d74aa337b4260840afd8e6b1ab99acc29dc0e9d9.tar.zst 42-cub3d-d74aa337b4260840afd8e6b1ab99acc29dc0e9d9.zip |
new func
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); +} |