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

◆ selectBasedOnHashBit()

static int8_t selectBasedOnHashBit ( uint8_t hash,
uint8_t bitnumber,
int8_t a,
int8_t b )
inlinestatic

Definition at line 164 of file noise.cpp.

164 {
165 int8_t result;
166#if !defined(__AVR__)
167 result = (hash & (1<<bitnumber)) ? a : b;
168#else
169 asm volatile(
170 "mov %[result],%[a] \n\t"
171 "sbrs %[hash],%[bitnumber] \n\t"
172 "mov %[result],%[b] \n\t"
173 : [result] "=r" (result)
174 : [hash] "r" (hash),
175 [bitnumber] "M" (bitnumber),
176 [a] "r" (a),
177 [b] "r" (b)
178 );
179#endif
180 return result;
181}
uint16_t hash(int32_t x, int32_t y)

Referenced by grad8().

+ Here is the caller graph for this function: