getPoint method

  1. @override
Vector? getPoint(
  1. double t, [
  2. Vector? optionalTarget
])
override

Implementation

@override
Vector? getPoint(double t, [Vector? optionalTarget]) {
  final point = optionalTarget ?? Vector2();

  if (t == 1) {
    point.setFrom(v2);
  } else {
    point.setFrom(v2).sub(v1);
    point.scale(t).add(v1);
  }

  return point;
}