From d38917190503b75b307654f54bf5b44c83d0aea4 Mon Sep 17 00:00:00 2001 From: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Date: Wed, 10 Apr 2024 21:18:46 +0200 Subject: [Math] Add `is_finite` methods --- include/godot_cpp/core/math.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/godot_cpp/core') 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) { -- cgit v1.2.3