Files
esphome/esphome
J. Nick Koston ecf36d60ae [color] Use integer math in Color::gradient to reduce code size
Replace floating-point arithmetic with integer weighted average.
This eliminates soft-float library calls on platforms without FPU
(e.g., ESP8266), reducing the function from 352 bytes.

The integer version uses uint16_t weighted average which matches
the float version's output in 99.96% of cases (off-by-one in
the remaining 0.04% due to float precision differences).
2026-02-27 08:30:28 -10:00
..