23 #ifndef __LIBRETRO_SDK_GFX_MATH_VECTOR_3_H__ 24 #define __LIBRETRO_SDK_GFX_MATH_VECTOR_3_H__ 35 #define vec3_dot(a, b) (a[0] * b[0] + a[1] * b[1] + a[2] * b[2]) 37 #define vec3_cross(dst, a, b) \ 38 dst[0] = a[1]*b[2] - a[2]*b[1]; \ 39 dst[1] = a[2]*b[0] - a[0]*b[2]; \ 40 dst[2] = a[0]*b[1] - a[1]*b[0] 42 #define vec3_length(a) sqrtf(vec3_dot(a,a)) 44 #define vec3_add(dst, src) \ 49 #define vec3_subtract(dst, src) \ 54 #define vec3_scale(dst, scale) \ 59 #define vec3_copy(dst, src) \ 64 #define vec3_normalize(dst) vec3_scale(dst,1.0f / vec3_length(dst)) RETRO_BEGIN_DECLS typedef float vec3_t[3]
Definition: vector_3.h:33
#define RETRO_BEGIN_DECLS
Definition: retro_common_api.h:41
#define RETRO_END_DECLS
Definition: retro_common_api.h:42