diff options
Diffstat (limited to 'src/crepe/api/Vector2.hpp')
-rw-r--r-- | src/crepe/api/Vector2.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/crepe/api/Vector2.hpp b/src/crepe/api/Vector2.hpp index ff53cb0..e195760 100644 --- a/src/crepe/api/Vector2.hpp +++ b/src/crepe/api/Vector2.hpp @@ -163,4 +163,9 @@ Vector2<T> Vector2<T>::perpendicular() const { return {-y, x}; } +template <class T> +bool Vector2<T>::is_nan() const { + return std::isnan(x) && std::isnan(y); +} + } // namespace crepe |