Calculates the (normalized) surface normal give three points Parms: n - the computed surface normal (filled in) v0,v1,v2 - three clockwise vertices Returns the magnitude of the normal before it was normalized. The bigger this value, the better the normal.
| 267 | // Returns the magnitude of the normal before it was normalized. |
| 268 | // The bigger this value, the better the normal. |
| 269 | float vm_GetNormal(vector *n, vector *v0, vector *v1, vector *v2) { |
| 270 | vm_GetPerp(n, v0, v1, v2); |
| 271 | |
| 272 | return vm_VectorNormalize(n); |
| 273 | } |
| 274 | |
| 275 | // Does a simple dot product calculation |
| 276 | float vm_DotProduct(vector *u, vector *v) { return (u->x * v->x) + (u->y * v->y) + (u->z * v->z); } |
nothing calls this directly
no test coverage detected