INNER CODE UNIT · Dart

dx0

roipeker/graphx · lib/src/math.dart:144

    var dx0 = x1 - x0, dy0 = y1 - y0, dx1 = x3 - x2, dy1 = y3 - y2;
    return dx0 * dx1 + dy0 * dy1;
  }

  /// Returns the floor of the number or expression specified in the parameter
  /// [value].
  /// Parameter [keepDouble] enforces the return type to be `double`.
  @pragma("vm:prefer-inline")
  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:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…