Vector2.hh
Go to the documentation of this file.
520 &operator<<(std::ostream &_out, const Vector2<T> &_pt)
void Max(const Vector2< T > &_v)
Set this vector's components to the maximum of itself and the passed in vector.
Definition: Vector2.hh:175
friend Vector2< T > operator-(const T _s, const Vector2< T > &_v)
Subtraction operators.
Definition: Vector2.hh:314
const Vector2 & operator*=(const Vector2 &_v)
Multiplication assignment operator.
Definition: Vector2.hh:383
const Vector2< T > & operator-=(T _s)
Subtraction assignment operator.
Definition: Vector2.hh:323
T setf(T... args)
const Vector2 & operator=(T _v)
Assignment operator.
Definition: Vector2.hh:218
T & operator[](const std::size_t _index)
Array subscript operator.
Definition: Vector2.hh:460
void Set(T _x, T _y)
Set the contents of the vector.
Definition: Vector2.hh:125
const Vector2 & operator-=(const Vector2 &_v)
Subtraction assignment operator.
Definition: Vector2.hh:293
bool IsFinite() const
See if a point is finite (e.g., not nan)
Definition: Vector2.hh:449
const Vector2 operator*(const Vector2 &_v) const
Multiplication operators.
Definition: Vector2.hh:374
double Distance(const Vector2 &_pt) const
Calc distance to the given point.
Definition: Vector2.hh:80
void Normalize()
Normalize the vector length.
Definition: Vector2.hh:102
const Vector2 & operator+=(const Vector2 &_v)
Addition assignment operator.
Definition: Vector2.hh:237
friend Vector2< T > operator+(const T _s, const Vector2< T > &_v)
Addition operators.
Definition: Vector2.hh:258
Vector2 operator-(const Vector2 &_v) const
Subtraction operator.
Definition: Vector2.hh:285
friend std::istream & operator>>(std::istream &_in, Vector2< T > &_pt)
Stream extraction operator.
Definition: Vector2.hh:540
static const size_t IGN_ONE_SIZE_T
size_t type with a value of 1
Definition: Helpers.hh:229
STL class.
T Dot(const Vector2< T > &_v) const
Get the dot product of this vector and _v.
Definition: Vector2.hh:134
const Vector2 & operator/=(T _v)
Division operator.
Definition: Vector2.hh:363
T min(T... args)
static const Vector2< T > One
math::Vector2(1, 1)
Definition: Vector2.hh:41
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:155
Vector2 Normalized() const
Returns a normalized vector.
Definition: Vector2.hh:115
static const Vector2< T > Zero
math::Vector2(0, 0)
Definition: Vector2.hh:38
T operator[](const std::size_t _index) const
Const-qualified array subscript operator.
Definition: Vector2.hh:468
Vector2 Abs() const
Get the absolute value of the vector.
Definition: Vector2.hh:141
static const size_t IGN_ZERO_SIZE_T
size_t type with a value of 0
Definition: Helpers.hh:226
T isfinite(T... args)
bool Equal(const Vector2 &_v, const T &_tol) const
Equality test with tolerance.
Definition: Vector2.hh:425
T max(T... args)
Vector2(const T &_x, const T &_y)
Constructor.
Definition: Vector2.hh:53
T Max() const
Get the maximum value in the vector.
Definition: Vector2.hh:192
void Min(const Vector2< T > &_v)
Set this vector's components to the minimum of itself and the passed in vector.
Definition: Vector2.hh:184
bool operator==(const Vector2 &_v) const
Equal to operator.
Definition: Vector2.hh:435
T pow(T... args)
const Vector2 operator/(const Vector2 &_v) const
Division operator.
Definition: Vector2.hh:335
Vector2< T > operator-(const T _s) const
Subtraction operators.
Definition: Vector2.hh:304
const Vector2 operator/(T _v) const
Division operator.
Definition: Vector2.hh:355
bool operator!=(const Vector2 &_v) const
Not equal to operator.
Definition: Vector2.hh:442
Vector2 operator-() const
Negation operator.
Definition: Vector2.hh:277
T Length() const
Returns the length (magnitude) of the vector.
Definition: Vector2.hh:88
const Vector2< T > & operator+=(const T _s)
Addition assignment operator.
Definition: Vector2.hh:267
Vector2< T > operator+(const T _s) const
Addition operators.
Definition: Vector2.hh:248
const Vector2 & operator/=(const Vector2 &_v)
Division operator.
Definition: Vector2.hh:344
const Vector2 operator*(T _v) const
Multiplication operators.
Definition: Vector2.hh:394
Definition: Angle.hh:42
const Vector2 & operator*=(T _v)
Multiplication assignment operator.
Definition: Vector2.hh:412
Vector2 operator+(const Vector2 &_v) const
Addition operator.
Definition: Vector2.hh:229
Vector2(const Vector2< T > &_v)
Copy constructor.
Definition: Vector2.hh:61
STL class.
T clamp(T _v, T _min, T _max)
Simple clamping function.
Definition: Helpers.hh:405
T SquaredLength() const
Returns the square of the length (magnitude) of the vector.
Definition: Vector2.hh:95
Vector2 & operator=(const Vector2 &_v)
Assignment operator.
Definition: Vector2.hh:207
T Min() const
Get the minimum value in the vector.
Definition: Vector2.hh:199
friend const Vector2 operator*(const T _s, const Vector2 &_v)
Scalar left multiplication operators.
Definition: Vector2.hh:403