From b21db5e6988566dc3344b3293eb7e33234ec2597 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 14 Jun 2021 11:06:35 +0200 Subject: BLI_math: Fix several division-by-zero cases. Those were caused by various tools used on degenerate geometry, see T79775. Note that fixes are as low-level as possible, to ensure they cover as much as possible of unreported issues too. We still probably have many more of those hidden in BLI_math though. --- source/blender/blenlib/BLI_math_vector.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/blenlib/BLI_math_vector.h') diff --git a/source/blender/blenlib/BLI_math_vector.h b/source/blender/blenlib/BLI_math_vector.h index b43f86af670..caedf83666f 100644 --- a/source/blender/blenlib/BLI_math_vector.h +++ b/source/blender/blenlib/BLI_math_vector.h @@ -327,6 +327,10 @@ MINLINE bool is_zero_v2(const float a[2]) ATTR_WARN_UNUSED_RESULT; MINLINE bool is_zero_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT; MINLINE bool is_zero_v4(const float a[4]) ATTR_WARN_UNUSED_RESULT; +MINLINE bool is_zero_v2_db(const double a[2]) ATTR_WARN_UNUSED_RESULT; +MINLINE bool is_zero_v3_db(const double a[3]) ATTR_WARN_UNUSED_RESULT; +MINLINE bool is_zero_v4_db(const double a[4]) ATTR_WARN_UNUSED_RESULT; + bool is_finite_v2(const float a[2]) ATTR_WARN_UNUSED_RESULT; bool is_finite_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT; bool is_finite_v4(const float a[4]) ATTR_WARN_UNUSED_RESULT; -- cgit v1.2.3