Definition at line 324 of file noise.cpp.
325{
326
327
328
329
330
331 int8_t result;
332 if( b > a) {
333 uint8_t delta = b - a;
334 uint8_t scaled =
scale8( delta, frac);
335 result = a + scaled;
336 } else {
337 uint8_t delta = a - b;
338 uint8_t scaled =
scale8( delta, frac);
339 result = a - scaled;
340 }
341 return result;
342}
LIB8STATIC_ALWAYS_INLINE uint8_t scale8(uint8_t i, fract8 scale)
Scale one byte by a second one, which is treated as the numerator of a fraction whose denominator is ...
References scale8().
Referenced by inoise8_raw(), inoise8_raw(), and inoise8_raw().