addScaled method

  1. @override
Vector4 addScaled(
  1. Vector v,
  2. double s
)
override

Implementation

@override
Vector4 addScaled(Vector v, double s) {
  x += v.x * s;
  y += v.y * s;
  if(v is Vector3){
    z += v.z * s;
  }
  else if(v is Vector4){
    z += v.z * s;
    w += v.w * s;
  }

  return this;
}