11 template<
typename T =
float>
25 :
x((T)vec.
x),
y((T)vec.
y)
30 :
x(scalar),
y(scalar)
45 return x == vec.
x &&
y == vec.
y;
50 return x != vec.
x ||
y != vec.
y;
200 return x <= other.
x &&
y <= other.
y;
205 return x < other.
x &&
y < other.
y;
210 return x >= other.
x &&
y >= other.
y;
215 return x > other.
x &&
y > other.
y;
271 return x * vec.
x +
y * vec.
y;
301 return x *
x +
y *
y;
368 return start + (finish - start) * t;
#define EHS_LOG_INT(type, code, msg)
Definition: Log.h:137
static T Pow(const T base, const I exponent)
Definition: Math.h:173
static T Degr(const T from)
Definition: Math.h:99
static T Rads(const T from)
Definition: Math.h:89
static R ACos(const R xPos, const T precision=10)
Definition: Math.h:328
static T Abs(const T from)
Definition: Math.h:70
static T Sqrt(const T from)
Definition: Math.h:238
static Str< Char_8, UInt_64 > FromNum(const SInt_64 num)
Definition: Str.h:1399
Vec2< T > GetPerpendicular(const Vec2< T > &length) const
Definition: Vec2.h:284
bool operator!=(const Vec2< T > &vec) const
Definition: Vec2.h:48
void Norm()
Definition: Vec2.h:326
Vec2(const Vec2< C > &vec)
Definition: Vec2.h:24
Vec2< T > & operator-=(const Vec2< T > &vec)
Definition: Vec2.h:89
void Abs()
Definition: Vec2.h:261
bool operator>=(const Vec2< T > &other) const
Definition: Vec2.h:208
T & operator[](const UInt_64 index)
Definition: Vec2.h:237
Vec2(const T x, const T y)
Definition: Vec2.h:18
Vec2 operator-()
Definition: Vec2.h:218
static Vec2 Lerp(const Vec2 &start, const Vec2 &finish, const T t)
Definition: Vec2.h:366
Vec2< T > & operator+=(const Vec2< T > &vec)
Definition: Vec2.h:53
Vec2< T > & operator/=(const T scalar)
Definition: Vec2.h:143
T GetMagnitude2() const
Definition: Vec2.h:299
Vec2< T > operator*(const Vec2< T > &vec) const
Definition: Vec2.h:170
Vec2< T > operator/(const Vec2< T > &vec) const
Definition: Vec2.h:133
T GetAngle(const Vec2< T > &vec) const
Definition: Vec2.h:274
T GetMagnitude() const
Definition: Vec2.h:294
bool operator<=(const Vec2< T > &other) const
Definition: Vec2.h:198
Vec2< T > & operator+=(const T scalar)
Definition: Vec2.h:71
void ToRads()
Definition: Vec2.h:344
Vec2< T > GetAbs() const
Definition: Vec2.h:251
void ToDegr()
Definition: Vec2.h:360
Vec2< T > GetReflection(const Vec2< T > &normal) const
Definition: Vec2.h:289
Vec2< T > & operator*=(const T scalar)
Definition: Vec2.h:180
T GetDot(const Vec2< T > &vec) const
Definition: Vec2.h:269
Vec2< T > & operator=(const Vec2< C > &vec)
Definition: Vec2.h:35
T GetDistance(const Vec2< T > &vec) const
Definition: Vec2.h:304
Vec2< T > GetNorm() const
Definition: Vec2.h:314
Vec2< T > operator-(const Vec2< T > &vec) const
Definition: Vec2.h:97
Vec2< T > operator+(const Vec2< T > &vec) const
Definition: Vec2.h:61
bool operator<(const Vec2< T > &other) const
Definition: Vec2.h:203
Vec2< T > & operator-=(const T scalar)
Definition: Vec2.h:107
Vec2< T > GetRads() const
Definition: Vec2.h:334
Vec2< T > & operator*=(const Vec2< T > &vec)
Definition: Vec2.h:162
Vec2< T > operator/(const T scalar) const
Definition: Vec2.h:151
bool operator==(const Vec2< T > &vec) const
Definition: Vec2.h:43
Vec2< T > GetDegr() const
Definition: Vec2.h:350
bool operator>(const Vec2< T > &other) const
Definition: Vec2.h:213
Vec2< T > & operator/=(const Vec2< T > &vec)
Definition: Vec2.h:125
Vec2< T > operator*(const T scalar) const
Definition: Vec2.h:188
T operator[](const UInt_64 index) const
Definition: Vec2.h:223
Vec2< T > operator+(const T scalar) const
Definition: Vec2.h:79
Vec2(const T scalar=0)
Definition: Vec2.h:29
Vec2< T > GetProjection(const Vec2< T > &length) const
Definition: Vec2.h:279
T GetDistance2(const Vec2< T > &vec) const
Definition: Vec2.h:309
Vec2< T > operator-(const T scalar) const
Definition: Vec2.h:115
Vec2< Int_64 > Vec2_64
Definition: Vec2.h:374
Vec2< double > Vec2_d
Definition: Vec2.h:385
Vec2< float > Vec2_f
Definition: Vec2.h:384
Vec2< UInt_16 > Vec2_u16
Definition: Vec2.h:378
Vec2< Int_16 > Vec2_16
Definition: Vec2.h:380
Vec2< Int_8 > Vec2_8
Definition: Vec2.h:383
Vec2< SInt_8 > Vec2_s8
Definition: Vec2.h:382
Vec2< UInt_64 > Vec2_u64
Definition: Vec2.h:372
Vec2< SInt_64 > Vec2_s64
Definition: Vec2.h:373
Vec2< UInt_8 > Vec2_u8
Definition: Vec2.h:381
Vec2< SInt_16 > Vec2_s16
Definition: Vec2.h:379
Vec2< Int_32 > Vec2_32
Definition: Vec2.h:377
Vec2< SInt_32 > Vec2_s32
Definition: Vec2.h:376
Vec2< UInt_32 > Vec2_u32
Definition: Vec2.h:375