Skip to content

cf_mul_un8

Category: graphics
GitHub: cute_color.h


Returns the 8-bit unsigned mutiplication of two input 8-bit numbers, intended for implementing 8-bit color blend operations.

uint8_t cf_mul_un8(int a, int b)
Parameters Description
a An 8-bit value promoted to an int upon calling.
b An 8-bit value promoted to an int upon calling.

Remarks

This is a helper-function intended for advanced users. The core calculation is done with full integers to help avoid intermediate overflows on 8-bit values.

cf_sub_un8
cf_div_un8
cf_add_un8