creates a completely random, non-normalized vector with a range of values from -1023 to +1024 values)
| 858 | |
| 859 | // creates a completely random, non-normalized vector with a range of values from -1023 to +1024 values) |
| 860 | void 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 |
| 867 | float vm_ComputeBoundingSphere(vector *center, vector *vecs, int num_verts) { |
no test coverage detected