INNER CODE UNIT · Dart
floor
roipeker/graphx · lib/src/math.dart:152
static num floor(double value, [bool keepDouble = true]) {
return keepDouble ? value.floorToDouble() : value.floor();
}
/// Linearly interpolates a value within a given range.
///
/// Given a [min] and [max] range and a [t] value between 0 and 1, returns a
/// linearly interpolated value within the [min]-[max] range.
///
/// Example:
/// ```dart
/// final min = 0;
/// final max = 100;
/// final t = 0.5;
/// final interpolatedValue = Math.lerp(min, max, t);
/// print(interpolatedValue); // 50
/// ```
@pragma("vm:prefer-inline")