MCPcopy Create free account
hub / github.com/crossuo/crossuo / Normalize

Method Normalize

src/Vector.cpp:64–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64void CVector::Normalize()
65{
66 if ((X == 0.0) && (Y == 0.0) && (Z == 0.0))
67 {
68 return;
69 }
70
71 double result = X * X + Y * Y + Z * Z;
72
73 //if (result)
74 {
75 result = sqrtl(result);
76
77 X /= result;
78 Y /= result;
79 Z /= result;
80 }
81}

Callers 1

CreateLandTextureRectMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected