51 const float len =
Length();
53 const float k = 1.0f / len;
120 return (x == rhs.
x) && (y == rhs.
y);
124 return !(*
this == rhs);
131 #ifdef LIBCARLA_INCLUDED_FROM_UE4 135 return *
this * 1e-2f;
143 FVector2D ToFVector2D()
const {
144 return FVector2D{
x, y};
147 #endif // LIBCARLA_INCLUDED_FROM_UE4 149 MSGPACK_DEFINE_ARRAY(x, y)
friend Vector2D operator+(Vector2D lhs, const Vector2D &rhs)
friend Vector2D operator*(Vector2D lhs, float rhs)
Vector2D & operator/=(float rhs)
This file contains definitions of common data structures used in traffic manager. ...
friend Vector2D operator-(Vector2D lhs, const Vector2D &rhs)
friend Vector2D operator/(float lhs, Vector2D rhs)
bool operator!=(const Vector2D &rhs) const
friend Vector2D operator*(float lhs, Vector2D rhs)
#define DEVELOPMENT_ASSERT(pred)
Vector2D & operator+=(const Vector2D &rhs)
Vector2D(float ix, float iy)
float SquaredLength() const
Vector2D MakeUnitVector() const
friend Vector2D operator/(Vector2D lhs, float rhs)
Vector2D & operator*=(float rhs)
Vector2D & operator-=(const Vector2D &rhs)
bool operator==(const Vector2D &rhs) const