Vector2-Impl.h
Go to the documentation of this file.
T AbsMin(T x, T y)
Returns the absolute minimum value among the two inputs.
Definition: MathUtils-Impl.h:39
VectorScalarRDiv< T, Vector > RDiv(const T &s) const
Computes (s, s, ... , s) / this.
Definition: Vector-Impl.h:440
size_t DominantAxis() const
Returns the index of the dominant axis.
Definition: Vector-Impl.h:247
T DistanceTo(const E &other) const
Returns the distance to the other vector.
Definition: Vector-Impl.h:289
Point< T, 2 > Ceil(const Point< T, 2 > &a)
Returns element-wise ceiled point.
Definition: Point2-Impl.h:492
const T & operator[](size_t i) const
Returns the const reference to the i -th element.
Definition: Vector-Impl.h:519
Matrix< T, 2, 2 > operator+(const Matrix< T, 2, 2 > &a, const Matrix< T, 2, 2 > &b)
Returns a + b (element-size).
Definition: Matrix2x2-Impl.h:660
size_t SubdominantAxis() const
Returns the index of the subdominant axis.
Definition: Vector-Impl.h:258
VectorTypeCast< U, Vector< T, N >, T > CastTo() const
Returns a vector with different value type.
Definition: Vector-Impl.h:313
Vector Sub(T v) const
Computes this - (v, v).
Definition: Vector2-Impl.h:88
Vector & operator=(const std::initializer_list< U > &list)
Set vector instance with initializer list.
Vector Mul(T v) const
Computes this * (v, v).
Definition: Vector2-Impl.h:100
bool IsEqual(const E &other) const
Returns true if other is the same as this vector.
Definition: Vector-Impl.h:320
T LengthSquared() const
Returns the squared length of the vector.
Definition: Vector-Impl.h:282
T At(size_t i) const
Returns const reference to the i -th element of the vector.
Definition: Vector-Impl.h:164
Point< T, 2 > Floor(const Point< T, 2 > &a)
Returns element-wise floored point.
Definition: Point2-Impl.h:498
Vector Div(T v) const
Computes this / (v, v).
Definition: Vector2-Impl.h:112
bool operator==(const E &v) const
Returns true if other is the same as this vector.
Definition: Vector-Impl.h:608
Matrix< T, 2, 2 > operator/(const Matrix< T, 2, 2 > &a, T b)
Definition: Matrix2x2-Impl.h:720
Definition: pybind11Utils.h:24
void IAdd(const T &s)
Computes this += (s, s, ... , s).
Definition: Vector-Impl.h:453
T Clamp(T val, T low, T high)
Returns the clamped value.
Definition: MathUtils-Impl.h:123
Vector & operator-=(const T &s)
Computes this -= (s, s, ... , s)
Definition: Vector-Impl.h:562
T Avg() const
Returns the average of all the elements.
Definition: Vector-Impl.h:189
void IMul(const T &s)
Computes this *= (s, s, ... , s).
Definition: Vector-Impl.h:479
Vector RSub(T v) const
Computes (v, v) - this.
Definition: Vector2-Impl.h:136
Vector RDiv(T v) const
Computes (v, v) / this.
Definition: Vector2-Impl.h:148
VectorScalarDiv< T, Vector > Normalized() const
Returns normalized vector.
Definition: Vector-Impl.h:269
Matrix< T, 2, 2 > operator-(const Matrix< T, 2, 2 > &a)
Returns a matrix with opposite sign.
Definition: Matrix2x2-Impl.h:654
Vector & operator*=(const T &s)
Computes this *= (s, s, ... , s)
Definition: Vector-Impl.h:577
Point< T, 2 > Max(const Point< T, 2 > &a, const Point< T, 2 > &b)
Returns element-wise max point: (max(a.x, b.x), max(a.y, b.y)).
Definition: Point2-Impl.h:480
Vector & operator/=(const T &s)
Computes this /= (s, s, ... , s)
Definition: Vector-Impl.h:592
Vector & operator+=(const T &s)
Computes this += (s, s, ... , s)
Definition: Vector-Impl.h:547
T AbsMax() const
Returns the absolute maximum element.
Definition: Vector-Impl.h:234
T DistanceSquaredTo(const E &other) const
Returns the squared distance to the other vector.
Definition: Vector-Impl.h:296
T Sum() const
Returns the sum of all the elements.
Definition: Vector-Impl.h:176
bool IsSimilar(const E &other, T epsilon=std::numeric_limits< T >::epsilon()) const
Returns true if other is similar to this vector.
Definition: Vector-Impl.h:340
T AbsMin() const
Returns the absolute minimum element.
Definition: Vector-Impl.h:221
Vector< T, 3 > operator*(const Quaternion< T > &q, const Vector< T, 3 > &v)
Returns quaternion q * vector v.
Definition: Quaternion-Impl.h:481
T MonotonicCatmullRom(const T &f0, const T &f1, const T &f2, const T &f3, T f)
Computes monotonic Catmull-Rom interpolation.
Definition: MathUtils-Impl.h:228
T AbsMax(T x, T y)
Returns the absolute maximum value among the two inputs.
Definition: MathUtils-Impl.h:45
void ISub(const T &s)
Computes this -= (s, s, ... , s).
Definition: Vector-Impl.h:466
bool operator!=(const E &v) const
Returns true if other is the not same as this vector.
Definition: Vector-Impl.h:615
Point< T, 2 > Min(const Point< T, 2 > &a, const Point< T, 2 > &b)
Returns element-wise min point: (min(a.x, b.x), min(a.y, b.y)).
Definition: Point2-Impl.h:474
VectorScalarRSub< T, Vector > RSub(const T &s) const
Computes (s, s, ... , s) - this.
Definition: Vector-Impl.h:427
Vector Add(T v) const
Computes this + (v, v).
Definition: Vector2-Impl.h:75
T Length() const
Returns the length of the vector.
Definition: Vector-Impl.h:276
void IDiv(const T &s)
Computes this /= (s, s, ... , s).
Definition: Vector-Impl.h:492