MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/PhysX / unitRandomQuat

Method unitRandomQuat

physx/samples/pxtoolkit/src/PxTkRandom.cpp:51–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51PxQuat BasicRandom::unitRandomQuat()
52{
53 PxQuat v;
54 do
55 {
56 v.x = randomFloat();
57 v.y = randomFloat();
58 v.z = randomFloat();
59 v.w = randomFloat();
60 }
61 while(v.normalize()<1e-6f);
62
63 return v;
64}
65
66
67void BasicRandom::unitRandomPt(PxVec3& v)

Callers 1

createTestCompoundMethod · 0.80

Calls 1

normalizeMethod · 0.45

Tested by

no test coverage detected