Definition at line 298 of file noise.cpp.
299{
300
301
302
303
304
305 int8_t result;
306 if( b > a) {
307 uint8_t delta = b - a;
308 uint8_t scaled =
scale8( delta, frac);
309 result = a + scaled;
310 } else {
311 uint8_t delta = a - b;
312 uint8_t scaled =
scale8( delta, frac);
313 result = a - scaled;
314 }
315 return result;
316}
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().