Definition at line 278 of file noise.cpp.
279{
280
281
282
283
284
285 int8_t result;
286 if( b > a) {
287 uint8_t delta = b - a;
288 uint8_t scaled =
scale8( delta, frac);
289 result = a + scaled;
290 } else {
291 uint8_t delta = a - b;
292 uint8_t scaled =
scale8( delta, frac);
293 result = a - scaled;
294 }
295 return result;
296}
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().