Lines Matching refs:x

47     f32 x;  member
78 VEC2(const f32* p) { x = p[0]; y = p[1]; } in VEC2()
80 VEC2(const VEC2_& v) { x = v.x; y = v.y; } in VEC2()
82 VEC2(f32 fx, f32 fy) { x = fx; y = fy; } in VEC2()
90 operator f32*() { return &x; }
93 operator const f32*() const { return &x; }
99 self_type& operator += (const self_type& rhs) { x += rhs.x; y += rhs.y; return *this; }
100 self_type& operator -= (const self_type& rhs) { x -= rhs.x; y -= rhs.y; return *this; }
101 self_type& operator *= (const self_type& rhs) { x *= rhs.x; y *= rhs.y; return *this; }
102 self_type& operator *= (f32 f) { x *= f; y *= f; return *this; }
103 self_type& operator /= (f32 f) { f32 r = 1.f / f; x *= r; y *= r; return *this; }
106 self_type operator - () const { return self_type(-x, -y); }
108 self_type operator + (const self_type& rhs) const { return self_type(x + rhs.x, y + rhs.y); }
109 self_type operator - (const self_type& rhs) const { return self_type(x - rhs.x, y - rhs.y); }
110 self_type operator * (f32 f) const { return self_type(f * x, f * y); }
111 self_type operator / (f32 f) const { f32 r = 1.f / f; return self_type(r * x, r * y); }
134 f32 LenSq() const { return x * x + y * y; } in LenSq()
137 f32 LengthSquare() const { return x * x + y * y; } in LengthSquare()
140 f32 Length() const { return FSqrt(this->x * this->x + this->y * this->y); } in Length()
190 void Set(f32 fx, f32 fy) { x = fx; y = fy; } in Set()
199 bool operator == (const self_type& rhs) const { return x == rhs.x && y == rhs.y; }
202 bool operator != (const self_type& rhs) const { return x != rhs.x || y != rhs.y; }
239 pOut->x = p1->x + p2->x; pOut->y = p1->y + p2->y; in VEC2Add()
259 pOut->x = p1->x - p2->x; pOut->y = p1->y - p2->y; in VEC2Sub()
275 pOut->x = p1->x * p2->x; in VEC2Mult()
295 pOut->x = p->x * scale; pOut->y = p->y * scale; in VEC2Scale()
314 pOut->x = p1->x + t * (p2->x - p1->x); in VEC2Lerp()
334 return p1->x * p2->x + p1->y * p2->y; in VEC2Dot()
348 return p->x * p->x + p->y * p->y; in VEC2LenSq()
359 VEC2Len(const VEC2* p) { return FSqrt(p->x * p->x + p->y * p->y); } in VEC2Len()
373 operator * (f32 f, const VEC2& rhs) { return VEC2(f * rhs.x, f * rhs.y); }