401#include <SFML/System/Vector2.inl>
#define SFML_SYSTEM_API
Definition Export.hpp:42
Represents an angle value.
Definition Angle.hpp:35
Class template for manipulating 2-dimensional vectors.
Definition Vector2.hpp:41
constexpr Vector2(T x, T y)
Construct the vector from cartesian coordinates.
constexpr T cross(Vector2 rhs) const
Z component of the cross product of two 2D vectors.
SFML_SYSTEM_API Angle angleTo(Vector2 rhs) const
Signed angle from *this to rhs (floating-point).
constexpr Vector2(Vector2< U > vector)
Construct the vector from another type of vector.
float x
Definition Vector2.hpp:210
constexpr Vector2 componentWiseDiv(Vector2 rhs) const
Component-wise division of *this and rhs.
constexpr Vector2()=default
Default constructor.
constexpr Vector2< T > operator+(Vector2< T > left, Vector2< T > right)
Overload of binary operator +.
float y
Definition Vector2.hpp:211
constexpr Vector2 perpendicular() const
Returns a perpendicular vector.
SFML_SYSTEM_API Angle angle() const
Signed angle from +X or (1,0) vector (floating-point).
constexpr T lengthSquared() const
Square of vector's length.
SFML_SYSTEM_API Vector2 normalized() const
Vector with same direction but length 1 (floating-point).
constexpr Vector2< T > operator-(Vector2< T > right)
Overload of unary operator -.
constexpr bool operator==(Vector2< T > left, Vector2< T > right)
Overload of binary operator ==.
constexpr Vector2< T > operator-(Vector2< T > left, Vector2< T > right)
Overload of binary operator -.
constexpr Vector2< T > & operator*=(Vector2< T > &left, T right)
Overload of binary operator *=.
static const Vector2 UnitY
Definition Vector2.hpp:219
constexpr Vector2< T > & operator+=(Vector2< T > &left, Vector2< T > right)
Overload of binary operator +=.
constexpr Vector2< T > & operator-=(Vector2< T > &left, Vector2< T > right)
Overload of binary operator -=.
static const Vector2 UnitX
Definition Vector2.hpp:218
SFML_SYSTEM_API Vector2(T r, Angle phi)
Construct the vector from polar coordinates (floating-point).
SFML_SYSTEM_API Vector2 projectedOnto(Vector2 axis) const
Projection of this vector onto axis (floating-point).
SFML_SYSTEM_API T length() const
Length of the vector (floating-point).
SFML_SYSTEM_API Vector2 rotatedBy(Angle phi) const
Rotate by angle phi (floating-point).
constexpr Vector2 componentWiseMul(Vector2 rhs) const
Component-wise multiplication of *this and rhs.
constexpr Vector2< T > & operator/=(Vector2< T > &left, T right)
Overload of binary operator /=.
constexpr T dot(Vector2 rhs) const
Dot product of two 2D vectors.
constexpr bool operator!=(Vector2< T > left, Vector2< T > right)
Overload of binary operator !=.
constexpr Vector2< T > operator*(Vector2< T > left, T right)
Overload of binary operator *.
constexpr Vector2< T > operator*(T left, Vector2< T > right)
Overload of binary operator *.
constexpr Vector2< T > operator/(Vector2< T > left, T right)
Overload of binary operator /.
Definition BlendMode.hpp:34
Vector2< unsigned int > Vector2u
Definition Vector2.hpp:225
Vector2< int > Vector2i
Definition Vector2.hpp:224
Vector2< float > Vector2f
Definition Vector2.hpp:226