Vector2.hh
Go to the documentation of this file.
Vector2< T > operator+(const T _s) const
Addition operators.
Definition: Vector2.hh:271
const Vector2 & operator*=(T _v)
Multiplication assignment operator.
Definition: Vector2.hh:435
const Vector2 & operator/=(const Vector2 &_v)
Division operator.
Definition: Vector2.hh:367
Vector2< T > operator-(const T _s) const
Subtraction operators.
Definition: Vector2.hh:327
const Vector2 & operator*=(const Vector2 &_v)
Multiplication assignment operator.
Definition: Vector2.hh:406
bool operator==(const Vector2 &_v) const
Equal to operator.
Definition: Vector2.hh:458
Vector2(const T &_x, const T &_y)
Constructor.
Definition: Vector2.hh:57
friend const Vector2 operator*(const T _s, const Vector2 &_v)
Scalar left multiplication operators.
Definition: Vector2.hh:426
T AbsDot(const Vector2< T > &_v) const
Return the absolute dot product of this vector and another vector. This is similar to the Dot functio...
Definition: Vector2.hh:178
friend Vector2< T > operator-(const T _s, const Vector2< T > &_v)
Subtraction operators.
Definition: Vector2.hh:337
friend std::istream & operator>>(std::istream &_in, Vector2< T > &_pt)
Stream extraction operator.
Definition: Vector2.hh:563
bool IsFinite() const
See if a point is finite (e.g., not nan)
Definition: Vector2.hh:472
T Min() const
Get the minimum value in the vector.
Definition: Vector2.hh:222
void Set(T _x, T _y)
Set the contents of the vector.
Definition: Vector2.hh:148
const Vector2< T > & operator-=(T _s)
Subtraction assignment operator.
Definition: Vector2.hh:346
bool operator!=(const Vector2 &_v) const
Not equal to operator.
Definition: Vector2.hh:465
void Max(const Vector2< T > &_v)
Set this vector's components to the maximum of itself and the passed in vector.
Definition: Vector2.hh:198
double Distance(const Vector2 &_pt) const
Calc distance to the given point.
Definition: Vector2.hh:84
const Vector2 operator/(T _v) const
Division operator.
Definition: Vector2.hh:378
bool operator<(const Vector2< T > &_pt) const
Less than operator.
Definition: Vector2.hh:553
void Min(const Vector2< T > &_v)
Set this vector's components to the minimum of itself and the passed in vector.
Definition: Vector2.hh:207
static const Vector2 NaN
math::Vector2(NaN, NaN, NaN)
Definition: Vector2.hh:45
static const Vector2< T > Zero
math::Vector2(0, 0)
Definition: Vector2.hh:39
Vector2 Abs() const
Get the absolute value of the vector.
Definition: Vector2.hh:164
T operator[](const std::size_t _index) const
Const-qualified array subscript operator.
Definition: Vector2.hh:491
bool Equal(const Vector2 &_v, const T &_tol) const
Equality test with tolerance.
Definition: Vector2.hh:448
T & operator[](const std::size_t _index)
Array subscript operator.
Definition: Vector2.hh:483
const Vector2 & operator/=(T _v)
Division operator.
Definition: Vector2.hh:386
const Vector2 operator*(T _v) const
Multiplication operators.
Definition: Vector2.hh:417
Vector2 operator+(const Vector2 &_v) const
Addition operator.
Definition: Vector2.hh:252
T SquaredLength() const
Returns the square of the length (magnitude) of the vector.
Definition: Vector2.hh:99
T Max() const
Get the maximum value in the vector.
Definition: Vector2.hh:215
const Vector2 operator/(const Vector2 &_v) const
Division operator.
Definition: Vector2.hh:358
const Vector2 & operator+=(const Vector2 &_v)
Addition assignment operator.
Definition: Vector2.hh:260
T Dot(const Vector2< T > &_v) const
Get the dot product of this vector and _v.
Definition: Vector2.hh:157
Vector2 Rounded() const
Get a rounded version of this vector.
Definition: Vector2.hh:138
Vector2(const Vector2< T > &_v)
Copy constructor.
Definition: Vector2.hh:65
static const Vector2< T > One
math::Vector2(1, 1)
Definition: Vector2.hh:42
T Length() const
Returns the length (magnitude) of the vector.
Definition: Vector2.hh:92
Vector2 Normalized() const
Returns a normalized vector.
Definition: Vector2.hh:120
friend Vector2< T > operator+(const T _s, const Vector2< T > &_v)
Addition operators.
Definition: Vector2.hh:281
Vector2 operator-() const
Negation operator.
Definition: Vector2.hh:300
const Vector2< T > & operator+=(const T _s)
Addition assignment operator.
Definition: Vector2.hh:290
Vector2 Round()
Round to near whole number, return the result.
Definition: Vector2.hh:129
Vector2 operator-(const Vector2 &_v) const
Subtraction operator.
Definition: Vector2.hh:308
void Normalize()
Normalize the vector length.
Definition: Vector2.hh:107
const Vector2 operator*(const Vector2 &_v) const
Multiplication operators.
Definition: Vector2.hh:397
const Vector2 & operator=(T _v)
Assignment operator.
Definition: Vector2.hh:241
Vector2 & operator=(const Vector2 &_v)
Assignment operator.
Definition: Vector2.hh:230
const Vector2 & operator-=(const Vector2 &_v)
Subtraction assignment operator.
Definition: Vector2.hh:316
T fail(T... args)
T isfinite(T... args)
T max(T... args)
T min(T... args)
std::ostream & operator<<(std::ostream &_out, const Graph< VV, EE, UndirectedEdge< EE >> &_g)
Partial template specification for undirected edges.
Definition: Graph.hh:745
static const size_t IGN_ZERO_SIZE_T
size_t type with a value of 0
Definition: Helpers.hh:227
T clamp(T _v, T _min, T _max)
Simple clamping function.
Definition: Helpers.hh:406
static const size_t IGN_ONE_SIZE_T
size_t type with a value of 1
Definition: Helpers.hh:230
Definition: Angle.hh:43
T setf(T... args)