Skip to content

Commit 71f8669

Browse files
authored
C++20 operator for XMFLOAT3 was missing (#310)
1 parent 50822d3 commit 71f8669

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Inc/DirectXMath.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -681,6 +681,11 @@ namespace DirectX
681681

682682
constexpr XMFLOAT3(float _x, float _y, float _z) noexcept : x(_x), y(_y), z(_z) {}
683683
explicit XMFLOAT3(_In_reads_(3) const float* pArray) noexcept : x(pArray[0]), y(pArray[1]), z(pArray[2]) {}
684+
685+
#if (__cplusplus >= 202002L)
686+
bool operator == (const XMFLOAT3&) const = default;
687+
auto operator <=> (const XMFLOAT3&) const = default;
688+
#endif
684689
};
685690

686691
// 3D Vector; 32 bit floating point components aligned on a 16 byte boundary

0 commit comments

Comments
 (0)