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

Method NormalizeScale

Source/Engine/Core/Math/Matrix.cpp:62–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62void Matrix::NormalizeScale()
63{
64 const float scaleX = 1.0f / Float3(M11, M21, M31).Length();
65 const float scaleY = 1.0f / Float3(M12, M22, M32).Length();
66 const float scaleZ = 1.0f / Float3(M13, M23, M33).Length();
67
68 M11 *= scaleX;
69 M21 *= scaleX;
70 M31 *= scaleX;
71
72 M12 *= scaleY;
73 M22 *= scaleY;
74 M32 *= scaleY;
75
76 M13 *= scaleZ;
77 M23 *= scaleZ;
78 M33 *= scaleZ;
79}
80
81void Matrix::Decompose(float& yaw, float& pitch, float& roll) const
82{

Callers

nothing calls this directly

Calls 2

Float3Class · 0.85
LengthMethod · 0.45

Tested by

no test coverage detected