Lines Matching refs:VEC2
28 struct VEC2;
31 NN_MATH_INLINE bool VEC2IsZero(const VEC2* p);
33 NN_MATH_INLINE VEC2* VEC2Lerp(VEC2* pOut, const VEC2* p1, const VEC2* p2, f32 t);
34 NN_MATH_INLINE f32 VEC2Dot(const VEC2* p1, const VEC2* p2);
35 NN_MATH_INLINE VEC2* VEC2Maximize(VEC2* pOut, const VEC2* p1, const VEC2* p2);
36 NN_MATH_INLINE VEC2* VEC2Minimize(VEC2* pOut, const VEC2* p1, const VEC2* p2);
37 NN_MATH_INLINE VEC2* VEC2Normalize(VEC2* pOut, const VEC2* p);
38 NN_MATH_INLINE VEC2* VEC2SafeNormalize(VEC2* pOut, const VEC2* p, const VEC2& alt);
39 NN_MATH_INLINE f32 VEC2DistSq(const VEC2* p1, const VEC2* p2);
40 NN_MATH_INLINE VEC2* VEC2Transform(VEC2* pOut, const MTX23* pM, const VEC2* pV);
54 struct VEC2 : public VEC2_ struct
60 static const VEC2& Zero() in Zero() argument
62 static const VEC2 zero(0.0f, 0.0f); in Zero()
68 static const VEC2& One() in One() argument
70 static const VEC2 one(1.0f, 1.0f); in One()
75 typedef VEC2 self_type; // argument
84 VEC2() {} in VEC2() argument
86 explicit VEC2(const f32* p) { x = p[0]; y = p[1]; } in VEC2() argument
88 VEC2(const VEC2_& v) { x = v.x; y = v.y; } in VEC2() function
90 VEC2(f32 fx, f32 fy) { x = fx; y = fy; } in VEC2() argument
127 self_type& Lerp(const VEC2& lhs, const VEC2& rhs, f32 t) in Lerp() argument
136 f32 Dot(const VEC2& vec) const in Dot() argument
160 self_type& SafeNormalize(const VEC2& alt) in SafeNormalize() argument
168 f32 DistanceSquare(const VEC2& vec) in DistanceSquare() argument
177 self_type& Maximize(const VEC2& lhs, const VEC2& rhs) in Maximize() argument
186 self_type& Minimize(const VEC2& lhs, const VEC2& rhs) in Minimize() argument
220 typedef struct VEC2 Vector2; argument
240 inline VEC2*
241 VEC2Add(VEC2* pOut, const VEC2* p1, const VEC2* p2) in VEC2Add()
260 inline VEC2*
261 VEC2Sub(VEC2* pOut, const VEC2* p1, const VEC2* p2) in VEC2Sub()
280 inline VEC2*
281 VEC2Mult(VEC2* pOut, const VEC2* p1, const VEC2* p2) in VEC2Mult()
297 inline VEC2*
298 VEC2Scale(VEC2* pOut, const VEC2* p, f32 scale) in VEC2Scale()
318 inline VEC2*
319 VEC2Lerp(VEC2* pOut, const VEC2* p1, const VEC2* p2, f32 t) in VEC2Lerp()
337 VEC2Dot(const VEC2* p1, const VEC2* p2) in VEC2Dot()
353 VEC2LenSq(const VEC2* p) in VEC2LenSq()
367 VEC2Len(const VEC2* p) { return FSqrt(p->x * p->x + p->y * p->y); } in VEC2Len()
378 VEC2DistSq(const VEC2* p1, const VEC2* p2) { VEC2 tmp; return VEC2LenSq(VEC2Sub(&tmp, p1, p2)); } in VEC2DistSq()
380 inline VEC2
381 operator * (f32 f, const VEC2& rhs) { return VEC2(f * rhs.x, f * rhs.y); }
398 inline bool VEC2IsZero(const VEC2& v){ return VEC2IsZero( &v ); } in VEC2IsZero()
399 inline VEC2* VEC2Add(VEC2* pOut, const VEC2& p1, const VEC2& p2) { return VEC2Add(pOut, &p1, &p2); } in VEC2Add()
400 inline VEC2* VEC2Sub(VEC2* pOut, const VEC2& v1, const VEC2& v2) { return VEC2Sub(pOut, &v1, &v2); } in VEC2Sub()
401 inline VEC2* VEC2Mult(VEC2* pOut, const VEC2& v1, const VEC2& v2) { return VEC2Mult(pOut, &v1, &v2)… in VEC2Mult()
402 inline VEC2* VEC2Scale(VEC2* pOut, const VEC2& v, f32 scale) { return VEC2Scale(pOut, &v, scale); } in VEC2Scale()
403 inline VEC2* VEC2Lerp(VEC2* pOut, const VEC2& v1, const VEC2& v2, f32 t) { return VEC2Lerp(pOut, &v… in VEC2Lerp()
404 inline f32 VEC2Dot(const VEC2& v1, const VEC2& v2) { return VEC2Dot(&v1, &v2); } in VEC2Dot()
405 inline f32 VEC2LenSq(const VEC2& v) { return VEC2LenSq( &v ); } in VEC2LenSq()
406 inline f32 VEC2Len(const VEC2& v) { return VEC2Len( &v ); } in VEC2Len()
407 inline f32 VEC2DistSq(const VEC2& v1, const VEC2& v2) { return VEC2DistSq( &v1, &v2 ); } in VEC2DistSq()
409 inline VEC2* VEC2Maximize(VEC2* pOut, const VEC2& v1, const VEC2& v2) { return VEC2Maximize( pOut, … in VEC2Maximize()
410 inline VEC2* VEC2Minimize(VEC2* pOut, const VEC2& v1, const VEC2& v2) { return VEC2Minimize( pOut, … in VEC2Minimize()
411 inline VEC2* VEC2Normalize(VEC2* pOut, const VEC2& v) { return VEC2Normalize( pOut, &v ); } in VEC2Normalize()
412 inline VEC2* VEC2SafeNormalize(VEC2* pOut, const VEC2& v, const VEC2& alt) { return VEC2SafeNormali… in VEC2SafeNormalize()
413 inline VEC2* VEC2Transform(VEC2* pOut, const MTX23& m, const VEC2& v) { return VEC2Transform( pOut,… in VEC2Transform()