calculates the conjugate of a quaternion * * Calculates the conjugate of a quaternion. The result is a * quaternion with the same magnitudes but with the sign of * the imaginary (vector) parts changed: * * q * = [w, -v] * * @name vmath.conj * @param q1 [type:quaternion] quaternion of which to calculate the conjugate * @re
| 2278 | * ``` |
| 2279 | */ |
| 2280 | static int Conj(lua_State* L) |
| 2281 | { |
| 2282 | Quat* q = CheckQuat(L, 1); |
| 2283 | PushQuat(L, dmVMath::Conjugate(*q)); |
| 2284 | return 1; |
| 2285 | } |
| 2286 | |
| 2287 | /*# rotates a vector by a quaternion |
| 2288 | * |