Lines Matching refs:q
123 void inv_q_normalize(long *q) in inv_q_normalize() argument
129 normSF += ((double)q[i]) / 1073741824L * ((double)q[i]) / 1073741824L; in inv_q_normalize()
134 q[i] = (int)((double)q[i] * normSF); in inv_q_normalize()
137 q[0] = 1073741824L; in inv_q_normalize()
138 q[1] = 0; in inv_q_normalize()
139 q[2] = 0; in inv_q_normalize()
140 q[3] = 0; in inv_q_normalize()
144 void inv_q_invert(const long *q, long *qInverted) in inv_q_invert() argument
147 qInverted[0] = q[0]; in inv_q_invert()
148 qInverted[1] = -q[1]; in inv_q_invert()
149 qInverted[2] = -q[2]; in inv_q_invert()
150 qInverted[3] = -q[3]; in inv_q_invert()
171 void inv_q_normalizef(float *q) in inv_q_normalizef() argument
176 normSF = (q[0] * q[0] + q[1] * q[1] + q[2] * q[2] + q[3] * q[3]); in inv_q_normalizef()
183 q[0] *= normSF; in inv_q_normalizef()
184 q[1] *= normSF; in inv_q_normalizef()
185 q[2] *= normSF; in inv_q_normalizef()
186 q[3] *= normSF; in inv_q_normalizef()
188 q[0] = 1.0; in inv_q_normalizef()
189 q[1] = 0.0; in inv_q_normalizef()
190 q[2] = 0.0; in inv_q_normalizef()
191 q[3] = 0.0; in inv_q_normalizef()
193 normSF = (q[0] * q[0] + q[1] * q[1] + q[2] * q[2] + q[3] * q[3]); in inv_q_normalizef()
199 void inv_q_norm4(float *q) in inv_q_norm4() argument
202 mag = sqrtf(q[0] * q[0] + q[1] * q[1] + q[2] * q[2] + q[3] * q[3]); in inv_q_norm4()
204 q[0] /= mag; in inv_q_norm4()
205 q[1] /= mag; in inv_q_norm4()
206 q[2] /= mag; in inv_q_norm4()
207 q[3] /= mag; in inv_q_norm4()
209 q[0] = 1.f; in inv_q_norm4()
210 q[1] = 0.f; in inv_q_norm4()
211 q[2] = 0.f; in inv_q_norm4()
212 q[3] = 0.f; in inv_q_norm4()
216 void inv_q_invertf(const float *q, float *qInverted) in inv_q_invertf() argument
219 qInverted[0] = q[0]; in inv_q_invertf()
220 qInverted[1] = -q[1]; in inv_q_invertf()
221 qInverted[2] = -q[2]; in inv_q_invertf()
222 qInverted[3] = -q[3]; in inv_q_invertf()