INNER CODE UNIT · Dart
lerp
roipeker/graphx · lib/src/math.dart:170
static double lerp(num min, num max, double t) {
return min + (max - min) * t;
}
/// Log base 10
static double log10(num value) {
return math.log(value) * math.log10e;
}
/// Maps a value from one range to another.
///
/// Given a [srcValue], [srcMin], [srcMax], [dstMin], and [dstMax], maps the
/// [srcValue] from the [srcMin]-[srcMax] range to the [dstMin]-[dstMax]
/// range.
///
/// Example:
/// ```dart
/// final srcValue = 50;