X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=vg%2Fvg_m.h;h=690683710d816a9bec4ec8444b29d54b58b9e007;hb=95036f2af35f1b5af66bfcd90811f7c3c4bebf78;hp=cb98db2d1a5a64f060a5c150b9bdc9d663a6b3d3;hpb=026b67150e9bd238709a6aeab656f7d01f3765a8;p=fishladder.git diff --git a/vg/vg_m.h b/vg/vg_m.h index cb98db2..6906837 100644 --- a/vg/vg_m.h +++ b/vg/vg_m.h @@ -77,6 +77,12 @@ static inline void v2_muls( v2f a, float s, v2f d ) d[0] = a[0]*s; d[1] = a[1]*s; } +static inline void v2_divs( v2f a, float s, v2f d ) +{ + d[0] = a[0]/s; d[1] = a[1]/s; +} + + static inline void v2_mul( v2f a, v2f b, v2f d ) { d[0] = a[0]*b[0]; d[1] = a[1]*b[1]; @@ -87,6 +93,11 @@ static inline void v2_div( v2f a, v2f b, v2f d ) d[0] = a[0]/b[0]; d[1] = a[1]/b[1]; } +static inline void v2_muladds( v2f a, v2f b, float s, v2f d ) +{ + d[0] = a[0]+b[0]*s; d[1] = a[1]+b[1]*s; +} + // Vector 3 // ==================================================================================================================