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