MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / normalize

Method normalize

Engine/source/math/mRotation.cpp:301–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299}
300
301void RotationF::normalize()
302{
303 if (mRotationType == Euler)
304 {
305 EulerF eul = EulerF(x, y, z);
306 eul.normalize();
307 set(eul);
308 }
309 else
310 {
311 QuatF quat;
312 quat.set(Point3F(x, y, z), w);
313
314 quat.normalize();
315
316 set(quat);
317 }
318}
319
320//Testing
321#ifdef TORQUE_TESTS_ENABLED

Callers 1

lookAtMethod · 0.45

Calls 3

Point3FClass · 0.70
setFunction · 0.50
setMethod · 0.45

Tested by

no test coverage detected