4#include <basis/seadTypes.h>
5#include <math/seadMathPolicies.h>
32 template <
typename VectorType>
47 template <
typename VectorType>
140 void set(T x_, T y_, T z_);
212 void set(T x_, T y_, T z_, T w_);
247static_assert(
sizeof(
Vector2f) == 8,
"sead::Vector2<T> size mismatch");
248static_assert(
sizeof(
Vector3f) == 0xC,
"sead::Vector3<T> size mismatch");
249static_assert(
sizeof(
Vector4f) == 0x10,
"sead::Vector4<T> size mismatch");
301#include <math/seadVector.hpp>
Definition seadMatrix.h:63
Definition seadMatrix.h:121
Definition seadMatrix.h:226
Definition seadMathPolicies.h:8
Definition seadVector.h:11
static const Vector2 ey
Definition seadVector.h:72
Self operator*(T t) const
Definition seadVector.hpp:24
Self & operator=(const Self &v)
Definition seadVector.hpp:112
Self & operator*=(T t)
Definition seadVector.hpp:80
Self & operator+=(const Self &v)
Definition seadVector.hpp:96
T squaredDistance(const Self &v) const
Definition seadVector.hpp:166
T dot(const Self &t) const
Definition seadVector.hpp:145
constexpr Vector2(const VectorType &v)
Definition seadVector.hpp:17
void multScalar(T t)
Definition seadVector.hpp:194
T distance(const Self &v) const
Definition seadVector.hpp:173
T length() const
Definition seadVector.hpp:159
Self operator+(const Self &v) const
Definition seadVector.hpp:51
Self operator-() const
Definition seadVector.hpp:71
static const Vector2 ones
Definition seadVector.h:73
T ValueType
Definition seadVector.h:16
T normalize()
Definition seadVector.hpp:201
void add(const Self &a)
Definition seadVector.hpp:180
Self & operator-=(const Self &v)
Definition seadVector.hpp:104
Self operator-(const Self &v) const
Definition seadVector.hpp:61
constexpr Vector2(const Vector2 &other)=default
Self & operator=(const VectorType &v)
Self operator/(T t) const
Definition seadVector.hpp:42
static const Vector2 zero
Definition seadVector.h:70
T setNormalize(const Self &v)
Definition seadVector.hpp:208
void set(T x_, T y_)
Definition seadVector.hpp:222
static const Vector2 ex
Definition seadVector.h:71
void setSub(const Self &a, const Self &b)
Definition seadVector.hpp:229
Vector2< T > Self
Definition seadVector.h:13
void div(const Self &a)
Definition seadVector.hpp:187
void set(const Self &v)
Definition seadVector.hpp:215
Self & operator/=(T t)
Definition seadVector.hpp:88
T squaredLength() const
Definition seadVector.hpp:152
bool operator!=(const Self &v) const
Definition seadVector.hpp:138
void setLerp(const Self &a, const Self &b, f32 ratio)
Definition seadVector.hpp:236
constexpr Vector2(T x_, T y_)
Definition seadVector.hpp:9
bool operator==(const Self &v) const
Definition seadVector.hpp:131
constexpr Vector2()
Definition seadVector.h:19
Definition seadVector.h:87
Self operator-(const Self &v) const
Definition seadVector.hpp:294
static const Vector3 ez
Definition seadVector.h:155
constexpr Vector3(const Vec2 &vec2, T z_)
Definition seadVector.hpp:250
constexpr Vector3(T x_, T y_, T z_)
Definition seadVector.hpp:243
void setSub(const Self &a, const Self &b)
Definition seadVector.hpp:460
T length() const
Definition seadVector.hpp:383
Self & operator/=(T t)
Definition seadVector.hpp:321
Matrix33< T > Mtx33
Definition seadVector.h:91
T dot(const Self &t) const
Definition seadVector.hpp:369
Self operator/(T t) const
Definition seadVector.hpp:275
void set(T x_, T y_, T z_)
Definition seadVector.hpp:439
void setMulAndDivByW(const Mtx44 &m, const Self &v)
constexpr Vector3(const Vector3 &other)=default
T normalize()
Definition seadVector.hpp:418
void setScaleAdd(T t, const Self &a, const Self &b)
Definition seadVector.hpp:502
void setMul(const Mtx34 &m, const Self &v)
Definition seadVector.hpp:481
T setNormalize(const Self &v)
Definition seadVector.hpp:425
static const Vector3 zero
Definition seadVector.h:152
T squaredLength() const
Definition seadVector.hpp:376
Matrix44< T > Mtx44
Definition seadVector.h:93
Self & operator=(const Self &v)
Definition seadVector.hpp:345
static const Vector3 ey
Definition seadVector.h:154
Self & operator+=(const Self &v)
Definition seadVector.hpp:329
void set(const Self &v)
Definition seadVector.hpp:432
Self operator+(const Self &v) const
Definition seadVector.hpp:284
Self operator*(T t) const
Definition seadVector.hpp:257
T squaredDistance(const Self &v) const
Definition seadVector.hpp:390
static const Vector3 ex
Definition seadVector.h:153
void setAdd(const Self &a, const Self &b)
Definition seadVector.hpp:453
bool operator!=(const Self &v) const
Definition seadVector.hpp:362
Matrix34< T > Mtx34
Definition seadVector.h:92
bool operator==(const Self &v) const
Definition seadVector.hpp:355
T distance(const Self &v) const
Definition seadVector.hpp:397
constexpr Vector3()
Definition seadVector.h:99
void setLerp(const Self &a, const Self &b, f32 ratio)
Definition seadVector.hpp:474
void setRotate(const Mtx33 &m, const Self &v)
Definition seadVector.hpp:488
Self operator-() const
Definition seadVector.hpp:304
Vector3< T > Self
Definition seadVector.h:89
void multScalar(T t)
Definition seadVector.hpp:411
void set(const Vec2 &vec2, T z_)
Definition seadVector.hpp:446
void setRotate(const Mtx34 &m, const Self &v)
Definition seadVector.hpp:495
static const Vector3 ones
Definition seadVector.h:156
void add(const Self &a)
Definition seadVector.hpp:404
Vector2< T > Vec2
Definition seadVector.h:90
Self & operator-=(const Self &v)
Definition seadVector.hpp:337
Self & operator*=(T t)
Definition seadVector.hpp:313
void setCross(const Self &a, const Self &b)
Definition seadVector.hpp:467
T ValueType
Definition seadVector.h:96
Definition seadVector.h:161
Self operator-(const Self &v) const
Definition seadVector.hpp:567
static const Vector4 ones
Definition seadVector.h:222
Self operator+(const Self &v) const
Definition seadVector.hpp:557
Self operator/(T t) const
Definition seadVector.hpp:548
T squaredDistance(const Self &v) const
Definition seadVector.hpp:664
constexpr Vector4()
Definition seadVector.h:171
void multScalar(T t)
Definition seadVector.hpp:678
Self & operator+=(const Self &v)
Definition seadVector.hpp:602
static const Vector4 ez
Definition seadVector.h:220
constexpr Vector4(T x_, T y_, T z_, T w_)
Definition seadVector.hpp:509
Self & operator*=(T t)
Definition seadVector.hpp:586
T normalize()
Definition seadVector.hpp:685
Self & operator/=(T t)
Definition seadVector.hpp:594
static const Vector4 ex
Definition seadVector.h:218
constexpr Vector4(const Vector4 &other)=default
Vector4< T > Self
Definition seadVector.h:163
void set(const Vec3 &vec3, T w_)
Definition seadVector.hpp:720
Self operator*(T t) const
Definition seadVector.hpp:530
Self & operator-=(const Self &v)
Definition seadVector.hpp:610
Vector2< T > Vec2
Definition seadVector.h:164
T distance(const Self &v) const
Definition seadVector.hpp:671
T length() const
Definition seadVector.hpp:657
Self & operator=(const Self &v)
Definition seadVector.hpp:618
T dot(const Self &t) const
Definition seadVector.hpp:643
Vector3< T > Vec3
Definition seadVector.h:165
void set(const Vec2 &vec2, T z_, T w_)
Definition seadVector.hpp:713
T setNormalize(const Self &v)
Definition seadVector.hpp:692
Self operator-() const
Definition seadVector.hpp:577
void set(T x_, T y_, T z_, T w_)
Definition seadVector.hpp:706
bool operator!=(const Self &v) const
Definition seadVector.hpp:636
constexpr Vector4(const Vec2 &vec2, T z_, T w_)
Definition seadVector.hpp:516
void set(const Self &v)
Definition seadVector.hpp:699
static const Vector4 ey
Definition seadVector.h:219
constexpr Vector4(const Vec3 &vec3, T w_)
Definition seadVector.hpp:523
bool operator==(const Self &v) const
Definition seadVector.hpp:629
void setLerp(const Self &a, const Self &b, f32 ratio)
Definition seadVector.hpp:727
static const Vector4 zero
Definition seadVector.h:217
T squaredLength() const
Definition seadVector.hpp:650
static const Vector4 ew
Definition seadVector.h:221
T ValueType
Definition seadVector.h:168
Definition seadAssert.h:44
Vector2< f32 > Vector2f
Definition seadVector.h:238
Vector2< u32 > Vector2u
Definition seadVector.h:242
Vector3< T > operator*(T t, const Vector3< T > &v)
Definition seadVector.hpp:266
Vector4< T > operator*(T t, const Vector4< T > &v)
Definition seadVector.hpp:539
Vector3< s32 > Vector3i
Definition seadVector.h:235
Vector2< s32 > Vector2i
Definition seadVector.h:234
Vector4< u32 > Vector4u
Definition seadVector.h:244
Vector3< u32 > Vector3u
Definition seadVector.h:243
Vector2< T > operator*(T t, const Vector2< T > &v)
Definition seadVector.hpp:33
Vector3< f32 > Vector3f
Definition seadVector.h:239
Vector4< f32 > Vector4f
Definition seadVector.h:240
Vector4< s32 > Vector4i
Definition seadVector.h:236