method

normalize

Importance_1
v2_2_9 - Show latest stable - 0 notes - Class: Vector
normalize() public

Returns a new vector with the same direction but with norm 1.

v = Vector[5,8,2].normalize
# => Vector[0.5184758473652127, 0.8295613557843402, 0.20739033894608505]
v.norm => 1.0
Show source
Register or log in to add new notes.