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