1 /* C version of the graphene math library */
16 static inline void cgm_vzero(cgm_vec3 *v);
17 static inline void cgm_vone(cgm_vec3 *v);
19 static inline void cgm_vadd(cgm_vec3 *a, const cgm_vec3 *b);
20 static inline void cgm_vsub(cgm_vec3 *a, const cgm_vec3 *b);
21 static inline void cgm_vmul(cgm_vec3 *a, const cgm_vec3 *b);
22 static inline void cgm_vscale(cgm_vec3 *v, float s);
24 static inline float cgm_vdot(const cgm_vec3 *a, const cgm_vec3 *b);
25 static inline void cgm_vcross(cgm_vec3 *res, const cgm_vec3 *a, const cgm_vec3 *b);
26 static inline float cgm_vlength(const cgm_vec3 *v);
27 static inline float cgm_vlength_sq(const cgm_vec3 *v);
28 static inline float cgm_vdist(const cgm_vec3 *a, const cgm_vec3 *b);
29 static inline float cgm_vdist_sq(const cgm_vec3 *a, const cgm_vec3 *b);
30 static inline void cgm_vnormalize(cgm_vec3 *v);
33 static inline void cgm_qident(cgm_quat *q);
35 static inline void cgm_qneg(cgm_quat *q);
36 static inline void cgm_qadd(cgm_quat *a, const cgm_quat *b);
37 static inline void cgm_qsub(cgm_quat *a, const cgm_quat *b);
38 static inline void cgm_qmul(cgm_quat *a, const cgm_quat *b);
40 static inline float cgm_qlength(const cgm_quat *q);
41 static inline float cgm_qlength_sq(const cgm_quat *q);
43 static inline void cgm_qnormalize(cgm_quat *q);
45 static inline void cgm_qconjugate(cgm_quat *q);
46 static inline void cgm_qinvert(cgm_quat *q);
48 static inline void cgm_qrot_axis(cgm_quat *q, float axis, float x, float y, float z);
49 static inline void cgm_qrot_quat(cgm_quat *q, const cgm_quat *rq);
51 static inline void cgm_qmatrix(float *mat, const cgm_quat *q);
53 static inline void cgm_qslerp(cgm_quat *res, const cgm_quat *a, const cgm_quat *b, float t);
57 #endif /* CGMATH_H_ */