Lines Matching refs:y
198 f32 y; // member
238 explicit VEC2(const f32* p) { x = p[0]; y = p[1]; } in VEC2()
240 VEC2(const VEC2_& v) { x = v.x; y = v.y; } in VEC2()
242 VEC2(f32 fx, f32 fy) { x = fx; y = fy; } in VEC2()
261 self_type& operator += (const self_type& rhs) { x += rhs.x; y += rhs.y; return *this; }
264 self_type& operator -= (const self_type& rhs) { x -= rhs.x; y -= rhs.y; return *this; }
267 self_type& operator *= (f32 f) { x *= f; y *= f; return *this; }
270 self_type& operator *= (const self_type& rhs) { x *= rhs.x; y *= rhs.y; return *this; }
273 self_type& operator /= (f32 f) { f32 r = 1.f / f; x *= r; y *= r; return *this; }
279 self_type operator - () const { return self_type(-x, -y); }
282 self_type operator + (const self_type& rhs) const { return self_type(x + rhs.x, y + rhs.y); }
285 self_type operator - (const self_type& rhs) const { return self_type(x - rhs.x, y - rhs.y); }
288 self_type operator * (f32 f) const { return self_type(f * x, f * y); }
291 self_type operator / (f32 f) const { f32 r = 1.f / f; return self_type(r * x, r * y); }
314 f32 LenSq() const { return x * x + y * y; } in LenSq()
317 f32 LengthSquare() const { return x * x + y * y; } in LengthSquare()
320 f32 Length() const { return FSqrt(this->x * this->x + this->y * this->y); } in Length()
370 void Set(f32 fx, f32 fy) { x = fx; y = fy; } in Set()
379 bool operator == (const self_type& rhs) const { return x == rhs.x && y == rhs.y; }
382 bool operator != (const self_type& rhs) const { return x != rhs.x || y != rhs.y; }
416 pOut->x = p1->x + p2->x; pOut->y = p1->y + p2->y; in VEC2Add()
427 pOut->x = p1->x - p2->x; pOut->y = p1->y - p2->y; in VEC2Sub()
435 pOut->y = p1->y * p2->y; in VEC2Mult()
446 pOut->x = p->x * scale; pOut->y = p->y * scale; in VEC2Scale()
455 pOut->y = p1->y + t * (p2->y - p1->y); in VEC2Lerp()
465 return p1->x * p2->x + p1->y * p2->y; in VEC2Dot()
472 return p->x * p->x + p->y * p->y; in VEC2LenSq()
476 VEC2Len(const VEC2* p) { return FSqrt(p->x * p->x + p->y * p->y); } in VEC2Len()
482 operator * (f32 f, const VEC2& rhs) { return VEC2(f * rhs.x, f * rhs.y); }