X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=blobdiff_plain;f=libs%2Fcgmath%2Fcgmvec4.inl;h=b68856c32d41493efe2698c8b8a2d84a6ea3ec19;hp=1c143c23da1e2ba860dbe913ca523b44ebc4f14f;hb=0d5155d4bb78c145268a4b1d2a327fc5e14eb0ef;hpb=80ffa1d4b9436c6cd0a71089434f8c2acf738b16 diff --git a/libs/cgmath/cgmvec4.inl b/libs/cgmath/cgmvec4.inl index 1c143c2..b68856c 100644 --- a/libs/cgmath/cgmvec4.inl +++ b/libs/cgmath/cgmvec4.inl @@ -104,6 +104,11 @@ static inline void cgm_wmul_v4m3(cgm_vec4 *v, const float *m) v->y = y; } +static inline float cgm_wdot(const cgm_vec4 *a, const cgm_vec4 *b) +{ + return a->x * b->x + a->y * b->y + a->z * b->z + a->w * b->w; +} + static inline float cgm_wlength(const cgm_vec4 *v) { return sqrt(v->x * v->x + v->y * v->y + v->z * v->z + v->w * v->w);