From d2c8a2bf07275f5458c576990b8742a710b15013 Mon Sep 17 00:00:00 2001 From: JAROWMR Date: Thu, 19 Dec 2024 20:16:30 +0100 Subject: is_nan fix --- src/crepe/api/Vector2.hpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/crepe/api/Vector2.hpp') diff --git a/src/crepe/api/Vector2.hpp b/src/crepe/api/Vector2.hpp index ff53cb0..a470595 100644 --- a/src/crepe/api/Vector2.hpp +++ b/src/crepe/api/Vector2.hpp @@ -163,4 +163,9 @@ Vector2 Vector2::perpendicular() const { return {-y, x}; } +template +bool Vector2::is_nan() const { + return std::isnan(x) && std::isnan(y); +} + } // namespace crepe -- cgit v1.2.3