js-util

Home > rc-js-util > Vec2 > normalize

Vec2.normalize() method

Returns a unit vector in the direction of this vector.

Signature:

normalize<TResult extends TTypedArray = TArray>(_result?: Vec2<TResult>): Vec2<TResult>;

Parameters

Parameter Type Description
_result Vec2<TResult> (Optional)

Returns:

Vec2<TResult>