scaleLength method

Vector scaleLength (
  1. num value
)

Implementation

Vector scaleLength(num value) {
  var scale = value / length;
  return Vector(x * scale, y * scale);
}