(float[] forward, float[] right, float[] up)
| 225 | } |
| 226 | |
| 227 | public static void MakeNormalVectors(float[] forward, float[] right, float[] up) { |
| 228 | // this rotate and negat guarantees a vector |
| 229 | // not colinear with the original |
| 230 | right[1] = -forward[0]; |
| 231 | right[2] = forward[1]; |
| 232 | right[0] = forward[2]; |
| 233 | |
| 234 | float d = DotProduct(right, forward); |
| 235 | VectorMA(right, -d, forward, right); |
| 236 | VectorNormalize(right); |
| 237 | CrossProduct(right, forward, up); |
| 238 | } |
| 239 | public static float SHORT2ANGLE(int x) { |
| 240 | return (x * shortratio); |
| 241 | } |