Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
roytam1 2023-05-15 09:19:37 +08:00
commit a7a525c65e
49 changed files with 1519 additions and 539 deletions

View file

@ -396,6 +396,20 @@ NumbersAreIdentical(T aValue1, T aValue2)
return BitwiseCast<Bits>(aValue1) == BitwiseCast<Bits>(aValue2);
}
/**
* Return true if |aValue| and |aValue2| are equal (ignoring sign if both are
* zero) or both NaN.
*/
template <typename T>
static inline bool
EqualOrBothNaN(T aValue1, T aValue2)
{
if (IsNaN(aValue1)) {
return IsNaN(aValue2);
}
return aValue1 == aValue2;
}
namespace detail {
template<typename T>