From ea8e155424f0e3430ab4d58b2681b3f32aafb6d5 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Fri, 15 May 2026 13:16:44 -0700 Subject: [PATCH] C++20 operator for XMFLOAT3 was missing --- Inc/DirectXMath.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Inc/DirectXMath.h b/Inc/DirectXMath.h index a322e48..e2bb65b 100644 --- a/Inc/DirectXMath.h +++ b/Inc/DirectXMath.h @@ -681,6 +681,11 @@ namespace DirectX constexpr XMFLOAT3(float _x, float _y, float _z) noexcept : x(_x), y(_y), z(_z) {} explicit XMFLOAT3(_In_reads_(3) const float* pArray) noexcept : x(pArray[0]), y(pArray[1]), z(pArray[2]) {} + + #if (__cplusplus >= 202002L) + bool operator == (const XMFLOAT3&) const = default; + auto operator <=> (const XMFLOAT3&) const = default; + #endif }; // 3D Vector; 32 bit floating point components aligned on a 16 byte boundary