SafeNormalize#
- 
template<typename T>
 inline T SafeNormalize( 
)#
- Safely normalizes a vector with fallback for zero-length vectors. - Template Parameters:
- T – Vector type that supports LengthSq(), multiplication, and InvSqrt() 
- Parameters:
- v – [in] Vector to normalize 
- fallback – [in] Fallback vector to return if v has zero length (default: default-constructed T) 
 
- Returns:
- Normalized vector if length > 0, fallback vector otherwise