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

Method unitRandomPt

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

Source from the content-addressed store, hash-verified

36static RandomR250 gRandomR250(0x95d6739b);
37
38PxVec3 BasicRandom::unitRandomPt()
39{
40 PxVec3 v;
41 do
42 {
43 v.x = randomFloat();
44 v.y = randomFloat();
45 v.z = randomFloat();
46 }
47 while(v.normalize()<1e-6f);
48 return v;
49}
50
51PxQuat BasicRandom::unitRandomQuat()
52{

Callers 2

createTestCompoundMethod · 0.80
buildSceneMethod · 0.80

Calls 1

normalizeMethod · 0.45

Tested by

no test coverage detected