Skip to content

Commit e827842

Browse files
committed
constexpr matrix comparisons
1 parent 1abe1f7 commit e827842

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

Inc/DirectXMath.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -932,15 +932,15 @@ namespace DirectX
932932
float& operator() (size_t Row, size_t Column) noexcept { return m[Row][Column]; }
933933

934934
#if (__cplusplus >= 202002L)
935-
bool operator == (const XMFLOAT4X3& M) const noexcept
935+
constexpr bool operator == (const XMFLOAT4X3& M) const noexcept
936936
{
937937
return _11 == M._11 && _12 == M._12 && _13 == M._13
938938
&& _21 == M._21 && _22 == M._22 && _23 == M._23
939939
&& _31 == M._31 && _32 == M._32 && _33 == M._33
940940
&& _41 == M._41 && _42 == M._42 && _43 == M._43;
941941
}
942942

943-
auto operator <=> (const XMFLOAT4X3& M) const noexcept
943+
constexpr auto operator <=> (const XMFLOAT4X3& M) const noexcept
944944
{
945945
if (auto cmp = _11 <=> M._11; cmp != 0) return cmp;
946946
if (auto cmp = _12 <=> M._12; cmp != 0) return cmp;
@@ -1001,14 +1001,14 @@ namespace DirectX
10011001
float& operator() (size_t Row, size_t Column) noexcept { return m[Row][Column]; }
10021002

10031003
#if (__cplusplus >= 202002L)
1004-
bool operator == (const XMFLOAT3X4& M) const noexcept
1004+
constexpr bool operator == (const XMFLOAT3X4& M) const noexcept
10051005
{
10061006
return _11 == M._11 && _12 == M._12 && _13 == M._13 && _14 == M._14
10071007
&& _21 == M._21 && _22 == M._22 && _23 == M._23 && _24 == M._24
10081008
&& _31 == M._31 && _32 == M._32 && _33 == M._33 && _34 == M._34;
10091009
}
10101010

1011-
auto operator <=> (const XMFLOAT3X4& M) const noexcept
1011+
constexpr auto operator <=> (const XMFLOAT3X4& M) const noexcept
10121012
{
10131013
if (auto cmp = _11 <=> M._11; cmp != 0) return cmp;
10141014
if (auto cmp = _12 <=> M._12; cmp != 0) return cmp;
@@ -1071,15 +1071,15 @@ namespace DirectX
10711071
float& operator() (size_t Row, size_t Column) noexcept { return m[Row][Column]; }
10721072

10731073
#if (__cplusplus >= 202002L)
1074-
bool operator == (const XMFLOAT4X4& M) const noexcept
1074+
constexpr bool operator == (const XMFLOAT4X4& M) const noexcept
10751075
{
10761076
return _11 == M._11 && _12 == M._12 && _13 == M._13 && _14 == M._14
10771077
&& _21 == M._21 && _22 == M._22 && _23 == M._23 && _24 == M._24
10781078
&& _31 == M._31 && _32 == M._32 && _33 == M._33 && _34 == M._34
10791079
&& _41 == M._41 && _42 == M._42 && _43 == M._43 && _44 == M._44;
10801080
}
10811081

1082-
auto operator <=> (const XMFLOAT4X4& M) const noexcept
1082+
constexpr auto operator <=> (const XMFLOAT4X4& M) const noexcept
10831083
{
10841084
if (auto cmp = _11 <=> M._11; cmp != 0) return cmp;
10851085
if (auto cmp = _12 <=> M._12; cmp != 0) return cmp;

0 commit comments

Comments
 (0)