C4 Engine Terathon Software C4 Engine API Documentation

• Math Library

API Links
Developer Links

Math::RandomUnitVector

Defined in:  C4Computation.h
Returns a random unit-length vector.
Prototype

Vector3D RandomUnitVector(void);

Description
The RandomUnitVector function returns a random unit-length vector. The values returned are evenly distributed over the 3D unit sphere.
See Also

Math::RandomUnitQuaternion

Math::Random

Math::RandomFloat