Lines Matching refs:Vector2
31 struct Vector2 { struct
39 void operator+=(const Vector2& v) { argument
44 void operator-=(const Vector2& 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}; }
73 Vector2 operator/(float s) const { return (Vector2){x / s, y / s}; }
75 Vector2 operator*(float s) const { return (Vector2){x * s, y * s}; }
83 Vector2 copyNormalized() const { in copyNormalized() argument
84 Vector2 v = {x, y}; in copyNormalized()
89 float dot(const Vector2& v) const { return x * v.x + y * v.y; } in dot() argument
91 float cross(const Vector2& v) const { return x * v.y - y * v.x; } in cross() argument