Lines Matching refs:v
39 void operator+=(const Vector2& v) {
40 x += v.x;
41 y += v.y;
44 void operator-=(const Vector2& v) {
45 x -= v.x;
46 y -= v.y;
49 void operator+=(const float v) {
50 x += v;
51 y += v;
54 void operator-=(const float v) {
55 x -= v;
56 y -= v;
69 Vector2 operator+(const Vector2& v) const { return (Vector2){x + v.x, y + v.y}; }
71 Vector2 operator-(const Vector2& v) const { return (Vector2){x - v.x, y - v.y}; }
84 Vector2 v = {x, y}; in copyNormalized() local
85 v.normalize(); in copyNormalized()
86 return v; in copyNormalized()
89 float dot(const Vector2& v) const { return x * v.x + y * v.y; } in dot()
91 float cross(const Vector2& v) const { return x * v.y - y * v.x; } in cross()
103 Vector3 operator+(const Vector3& v) const { return (Vector3){x + v.x, y + v.y, z + v.z}; }
105 Vector3 operator-(const Vector3& v) const { return (Vector3){x - v.x, y - v.y, z - v.z}; }