FastLED 3.9.15
Loading...
Searching...
No Matches

◆ map()

long fl::anonymous_namespace{frame_tracker.cpp}::map ( long x,
long in_min,
long in_max,
long out_min,
long out_max )

Definition at line 6 of file frame_tracker.cpp.

6 {
7 const long run = in_max - in_min;
8 if (run == 0) {
9 return 0; // AVR returns -1, SAM returns 0
10 }
11 const long rise = out_max - out_min;
12 const long delta = x - in_min;
13 return (delta * rise) / run + out_min;
14}
uint32_t x[NUM_LAYERS]
Definition Fire2023.ino:80

References map(), and x.

Referenced by map().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: