MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / vm_MakeRandomVector

Function vm_MakeRandomVector

vecmat/vector.cpp:860–864  ·  view source on GitHub ↗

creates a completely random, non-normalized vector with a range of values from -1023 to +1024 values)

Source from the content-addressed store, hash-verified

858
859// creates a completely random, non-normalized vector with a range of values from -1023 to +1024 values)
860void vm_MakeRandomVector(vector *vec) {
861 vec->x = ps_rand() - D3_RAND_MAX / 2;
862 vec->y = ps_rand() - D3_RAND_MAX / 2;
863 vec->z = ps_rand() - D3_RAND_MAX / 2;
864}
865
866// Given a set of points, computes the minimum bounding sphere of those points
867float vm_ComputeBoundingSphere(vector *center, vector *vecs, int num_verts) {

Callers 2

ai_moveFunction · 0.50
DoNewPlayerDeathFrameFunction · 0.50

Calls 1

ps_randFunction · 0.85

Tested by

no test coverage detected