Skip to content

Commit e914417

Browse files
DedeHaisofthack007
authored andcommitted
Merge pull request wled#4181 from DedeHai/0_15_trig_math
Added integer based `sin()/cos()` functions, changed all trig functions to wled_math
1 parent 5ea9cb1 commit e914417

File tree

5 files changed

+319
-179
lines changed

5 files changed

+319
-179
lines changed

usermods/Analog_Clock/Analog_Clock.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ class AnalogClockUsermod : public Usermod {
102102

103103
void secondsEffectSineFade(int16_t secondLed, Toki::Time const& time) {
104104
uint32_t ms = time.ms % 1000;
105-
uint8_t b0 = (cos8(ms * 64 / 1000) - 128) * 2;
105+
uint8_t b0 = (cos8_t(ms * 64 / 1000) - 128) * 2;
106106
setPixelColor(secondLed, gamma32(scale32(secondColor, b0)));
107-
uint8_t b1 = (sin8(ms * 64 / 1000) - 128) * 2;
107+
uint8_t b1 = (sin8_t(ms * 64 / 1000) - 128) * 2;
108108
setPixelColor(inc(secondLed, 1, secondsSegment), gamma32(scale32(secondColor, b1)));
109109
}
110110

0 commit comments

Comments
 (0)