Update Comparison.h
This commit is contained in:
@@ -36,16 +36,6 @@ inline float minOrDefined(const float a, const float b) {
|
|||||||
return yoga::isUndefined(a) ? b : a;
|
return yoga::isUndefined(a) ? b : a;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline FloatOptional maxOrDefined(FloatOptional op1, FloatOptional op2) {
|
|
||||||
if (op1 >= op2) {
|
|
||||||
return op1;
|
|
||||||
}
|
|
||||||
if (op2 > op1) {
|
|
||||||
return op2;
|
|
||||||
}
|
|
||||||
return op1.isUndefined() ? op2 : op1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Custom equality functions using a hardcoded epsilon of 0.0001f, or returning
|
// Custom equality functions using a hardcoded epsilon of 0.0001f, or returning
|
||||||
// true if both floats are NaN.
|
// true if both floats are NaN.
|
||||||
inline bool inexactEquals(const float a, const float b) {
|
inline bool inexactEquals(const float a, const float b) {
|
||||||
@@ -62,10 +52,6 @@ inline bool inexactEquals(const double a, const double b) {
|
|||||||
return yoga::isUndefined(a) && yoga::isUndefined(b);
|
return yoga::isUndefined(a) && yoga::isUndefined(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool inexactEquals(const FloatOptional a, const FloatOptional b) {
|
|
||||||
return inexactEquals(a.unwrap(), b.unwrap());
|
|
||||||
}
|
|
||||||
|
|
||||||
inline bool inexactEquals(const YGValue& a, const YGValue& b) {
|
inline bool inexactEquals(const YGValue& a, const YGValue& b) {
|
||||||
if (a.unit != b.unit) {
|
if (a.unit != b.unit) {
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user