setLength method

Vector2 setLength(
  1. double length
)

Implementation

Vector2 setLength(double length) {
  return normalize().multiplyScalar(length);
}