cf_pixel_lerp¶
Category: graphics
GitHub: cute_color.h
Lerps from one CF_Pixel to another.
CF_Pixel cf_pixel_lerp(CF_Pixel a, CF_Pixel b, float s) { CF_Color A = cf_pixel_to_color(a); return cf_color_to_pixel(cf_add_color(A, cf_mul_color(cf_sub_color(cf_pixel_to_color(b), A), s))); }
| Parameters | Description |
|---|---|
a |
The first pixel. |
b |
The second pixel. |
s |
The interpolant from 0 to 1. |
Related Pages¶
cf_mul_pixel
cf_div_pixel
cf_add_pixel
cf_sub_pixel
cf_pixel_premultiply