Contents

SushiEngine::placeholder

normalize

template <typename T>
Vector3T< T > normalize(const Vector3T< T > &v) noexcept

Parameters

NameType
vconst Vector3T< T > &

Returns

Vector3T< T >

Description

Unit vector in the direction of v; returns v unchanged if degenerate.

template <typename T>
QuaternionT< T > normalize(const QuaternionT< T > &q) noexcept

Parameters

NameType
qconst QuaternionT< T > &

Returns

QuaternionT< T >

Description

Unit quaternion; returns identity if degenerate.