Update Comparison.h

This commit is contained in:
Nick Gerleman
2023-10-03 16:43:38 -07:00
committed by GitHub
parent bf2bec80da
commit ced7f3a9aa

View File

@@ -8,15 +8,16 @@
#pragma once
#include <array>
#include <concepts>
#include <yoga/Yoga.h>
#include <yoga/numeric/FloatOptional.h>
namespace facebook::yoga {
template <typename FloatT>
inline bool isUndefined(FloatT value) {
return std::isnan(value);
constexpr bool isUndefined(std::floating_point auto value) {
// Can be replaced by constexpr std::isnan in C++ 23
return value != value;
}
inline float maxOrDefined(const float a, const float b) {