diff options
| author | aura <nw@moneybot.cc> | 2026-07-27 11:55:57 +0200 |
|---|---|---|
| committer | aura <nw@moneybot.cc> | 2026-07-27 11:55:57 +0200 |
| commit | 372f23024163e0fab57a847ddda41f06857efd7e (patch) | |
| tree | ca57dd38a583387a7bbcc970b7d359731df0f4bf /src/util/vector.h | |
| parent | 452e3619450ab9e7d22886445f61cc90272e4d60 (diff) | |
undo/redo props - WIP
Diffstat (limited to 'src/util/vector.h')
| -rw-r--r-- | src/util/vector.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/util/vector.h b/src/util/vector.h index eb386ab..294b627 100644 --- a/src/util/vector.h +++ b/src/util/vector.h @@ -13,10 +13,9 @@ struct VEC2 { VEC2() { x = y = 0.0f; } VEC2( F32 X, F32 Y ) { x = X; y = Y; } - VEC2( const VEC2& v ) { x = v.x; y = v.y; } + VEC2( const VEC2& v ) = default; bool operator==( const VEC2& v ) const { return ( x == v.x && y == v.y ); } - VEC2& operator=( const VEC2& v ) { x = v.x; y = v.y; return *this; } F32& operator[]( I32 i ) { return ( (F32*)this )[i]; } F32 operator[]( I32 i ) const { return ( (const F32*)this )[i]; } @@ -48,13 +47,12 @@ struct VEC3 { VEC3() { x = y = z = 0.0f; } VEC3( F32 X, F32 Y, F32 Z ) { x = X; y = Y; z = Z; } - VEC3( const VEC3& v ) { x = v.x; y = v.y; z = v.z; } + VEC3( const VEC3& v ) = default; VEC3( const VEC2& v ) { x = v.x; y = v.y; z = 0.f; } bool operator==( const VEC3& v ) const { return ( x == v.x && y == v.y && z == v.z ); } bool operator!=( const VEC3& v ) const { return !( x == v.x && y == v.y && z == v.z ); } - VEC3& operator=( const VEC3& v ) { x = v.x; y = v.y; z = v.z; return *this; } F32& operator[]( I32 i ) { return ( (F32*)this )[i]; } F32 operator[]( I32 i ) const { return ( (F32*)this )[i]; } @@ -84,7 +82,7 @@ struct VEC4 { VEC4() { x = y = z = w = 0; } VEC4( F32 X, F32 Y, F32 Z, F32 W ) { x = X; y = Y; z = Z; w = W; } - VEC4( const VEC4& v ) { x = v.x; y = v.y; z = v.z; w = v.w; } + VEC4( const VEC4& v ) = default; VEC4( const VEC3& v ) { x = v.x; y = v.y; z = v.z; w = 1.f; } VEC4( const VEC2& v ) { x = v.x; y = v.y; z = 0.f; w = 1.f; } @@ -93,7 +91,6 @@ struct VEC4 { VEC4( F32* v ) { x = v[0]; y = v[1]; z = v[2]; w = v[3]; } - VEC4 operator=( const VEC4& v ) { x = v.x; y = v.y; z = v.z; w = v.w; return *this; } F32& operator[]( const int i ) { return *(&x + i); } F32 operator[]( const int i ) const { return *(&x + i); } |
