Merge pull request #1436 from AThousandShips/math_update

[Math] Add `is_finite` methods
This commit is contained in:
David Snopek
2024-04-24 14:43:36 -05:00
committed by GitHub
21 changed files with 58 additions and 0 deletions

View File

@@ -613,6 +613,14 @@ inline bool is_inf(double p_val) {
return std::isinf(p_val);
}
inline bool is_finite(float p_val) {
return std::isfinite(p_val);
}
inline bool is_finite(double p_val) {
return std::isfinite(p_val);
}
inline bool is_equal_approx(float a, float b) {
// Check for exact equality first, required to handle "infinity" values.
if (a == b) {