MCPcopy Create free account
hub / github.com/defold/defold / Conj

Function Conj

engine/script/src/script_vmath.cpp:2280–2285  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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 *

Callers

nothing calls this directly

Calls 3

CheckQuatFunction · 0.85
PushQuatFunction · 0.85
ConjugateFunction · 0.85

Tested by

no test coverage detected