50x(static_cast<T>(vector.x)),
51y(static_cast<T>(vector.y))
60 return Vector2<T>(-right.x, -right.y);
66inline Vector2<T>&
operator +=(Vector2<T>& left,
const Vector2<T>& right)
77inline Vector2<T>&
operator -=(Vector2<T>& left,
const Vector2<T>& right)
88inline Vector2<T>
operator +(
const Vector2<T>& left,
const Vector2<T>& right)
90 return Vector2<T>(left.x + right.x, left.y + right.y);
96inline Vector2<T>
operator -(
const Vector2<T>& left,
const Vector2<T>& right)
98 return Vector2<T>(left.x - right.x, left.y - right.y);
106 return Vector2<T>(left.x * right, left.y * right);
114 return Vector2<T>(right.x * left, right.y * left);
133 return Vector2<T>(left.x / right, left.y / right);
150inline bool operator ==(
const Vector2<T>& left,
const Vector2<T>& right)
152 return (left.x == right.x) && (left.y == right.y);
158inline bool operator !=(
const Vector2<T>& left,
const Vector2<T>& right)
160 return (left.x != right.x) || (left.y != right.y);
Vector2< T > & operator-=(Vector2< T > &left, const Vector2< T > &right)
Vector2< T > operator-(const Vector2< T > &right)
Vector2< T > operator*(const Vector2< T > &left, T right)
Vector2< T > operator+(const Vector2< T > &left, const Vector2< T > &right)
Vector2< T > operator/(const Vector2< T > &left, T right)
Vector2< T > & operator*=(Vector2< T > &left, T right)
Vector2< T > & operator/=(Vector2< T > &left, T right)
Vector2< T > & operator+=(Vector2< T > &left, const Vector2< T > &right)
Utility template class for manipulating 2-dimensional vectors.
Vector2()
Default constructor.
SFML_NETWORK_API bool operator==(const IpAddress &left, const IpAddress &right)
Overload of == operator to compare two IP addresses.
SFML_NETWORK_API bool operator!=(const IpAddress &left, const IpAddress &right)
Overload of != operator to compare two IP addresses.