getPoint method

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

Implementation

@override
Vector? getPoint(double t, [Vector? optionalTarget]) {
  final point = Vector3.zero();//optionalTarget;
  if(optionalTarget != null){
    point.setFrom(optionalTarget);
  }

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

  return point;
}