diff options
| author | David Snopek <dsnopek@gmail.com> | 2024-04-24 14:43:36 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-24 14:43:36 -0500 |
| commit | 61450b3e1beee413f38b586a361e1f9fe6de1492 (patch) | |
| tree | d3fbfd60fae38c11ce925095842b3c1ac87af4cc /include/godot_cpp/core | |
| parent | ad307e4b9ceb2efc40a238c19d37f41def4742d6 (diff) | |
| parent | d38917190503b75b307654f54bf5b44c83d0aea4 (diff) | |
| download | redot-cpp-61450b3e1beee413f38b586a361e1f9fe6de1492.tar.gz | |
Merge pull request #1436 from AThousandShips/math_update
[Math] Add `is_finite` methods
Diffstat (limited to 'include/godot_cpp/core')
| -rw-r--r-- | include/godot_cpp/core/math.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/godot_cpp/core/math.hpp b/include/godot_cpp/core/math.hpp index 2cbbe27..1949360 100644 --- a/include/godot_cpp/core/math.hpp +++ b/include/godot_cpp/core/math.hpp @@ -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) { |
