MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / normalize

Function normalize

Source/ThirdParty/meshoptimizer/simplifier.cpp:702–714  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

700};
701
702static float normalize(Vector3& v)
703{
704 float length = sqrtf(v.x * v.x + v.y * v.y + v.z * v.z);
705
706 if (length > 0)
707 {
708 v.x /= length;
709 v.y /= length;
710 v.z /= length;
711 }
712
713 return length;
714}
715
716static void quadricAdd(Quadric& Q, const Quadric& R)
717{

Callers 5

quadricFromTriangleFunction · 0.70
quadricFromTriangleEdgeFunction · 0.70
quadricVolumeGradientFunction · 0.70
vecClass · 0.50
format_floatFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected