diff options
Diffstat (limited to 'src/rodeo_math.c')
| -rw-r--r-- | src/rodeo_math.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/rodeo_math.c b/src/rodeo_math.c new file mode 100644 index 0000000..99f61af --- /dev/null +++ b/src/rodeo_math.c @@ -0,0 +1,14 @@ +#include "rodeo.h" +#include "rodeo_math.h" + +uint32_t +Rodeo__\ +Math__\ +color_rgba_to_uint32(const struct Rodeo__color_rgba_t color) +{ + return + ((uint32_t)(uint8_t)(color.red * 255)) + | ((uint32_t)(uint8_t)(color.green * 255)) << (8 * 1) + | ((uint32_t)(uint8_t)(color.blue * 255)) << (8 * 2) + | ((uint32_t)(uint8_t)(color.alpha * 255)) << (8 * 3); +} |
