|
@@ -126,9 +126,9 @@ double EasingStyleValue::Function::evaluate_at(double input_progress, bool befor
|
|
|
|
|
|
size_t nearby_index = 0;
|
|
|
if (auto found = binary_search(cached_x_samples, x, &nearby_index, [](auto x, auto& sample) {
|
|
|
- if (x > sample.x)
|
|
|
+ if (x - sample.x >= NumericLimits<double>::epsilon())
|
|
|
return 1;
|
|
|
- if (x < sample.x)
|
|
|
+ if (x - sample.x <= NumericLimits<double>::epsilon())
|
|
|
return -1;
|
|
|
return 0;
|
|
|
}))
|
|
@@ -146,9 +146,9 @@ double EasingStyleValue::Function::evaluate_at(double input_progress, bool befor
|
|
|
}
|
|
|
|
|
|
if (auto found = binary_search(cached_x_samples, x, &nearby_index, [](auto x, auto& sample) {
|
|
|
- if (x > sample.x)
|
|
|
+ if (x - sample.x >= NumericLimits<double>::epsilon())
|
|
|
return 1;
|
|
|
- if (x < sample.x)
|
|
|
+ if (x - sample.x <= NumericLimits<double>::epsilon())
|
|
|
return -1;
|
|
|
return 0;
|
|
|
}))
|