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

Method normalize

Engine/source/math/mRotation.cpp:286–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284}
285
286void RotationF::normalize()
287{
288 if (mRotationType == Euler)
289 {
290 EulerF eul = EulerF(x, y, z);
291 eul.normalize();
292 set(eul);
293 }
294 else
295 {
296 QuatF quat;
297 quat.set(Point3F(x, y, z), w);
298
299 quat.normalize();
300
301 set(quat);
302 }
303}
304
305//Testing
306#ifdef TORQUE_TESTS_ENABLED

Callers 1

lookAtMethod · 0.45

Calls 3

setFunction · 0.85
Point3FClass · 0.70
setMethod · 0.45

Tested by

no test coverage detected