setMag

final static Vector2D setMag(Vector2D $self, Float n)

Set the magnitude of this vector to the value used for the n parameter.

Parameters

n

the new length of the vector