diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-08-20 13:34:52 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-08-20 13:34:52 +0400 |
commit | 38338a51c92e3f47601199689c294da8a20bec18 (patch) | |
tree | 5126a8841dc87de0b81e09d9348e74fa550c0e0b /source/blender/blenlib/BLI_math_vector.h | |
parent | f3654ce6b66ead081345f62aea3dec3461e4d1e2 (diff) |
add is_finite_v# functions, use bool's
Diffstat (limited to 'source/blender/blenlib/BLI_math_vector.h')
-rw-r--r-- | source/blender/blenlib/BLI_math_vector.h | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/source/blender/blenlib/BLI_math_vector.h b/source/blender/blenlib/BLI_math_vector.h index e163c06440c..0a819ce062e 100644 --- a/source/blender/blenlib/BLI_math_vector.h +++ b/source/blender/blenlib/BLI_math_vector.h @@ -196,18 +196,24 @@ void flip_v2_v2v2(float v[2], const float v1[2], const float v2[2]); /********************************* Comparison ********************************/ -MINLINE int is_zero_v3(const float a[3]) UNUSED_RESULT_ATTR; -MINLINE int is_zero_v4(const float a[4]) UNUSED_RESULT_ATTR; -MINLINE int is_one_v3(const float a[3]) UNUSED_RESULT_ATTR; - -MINLINE int equals_v2v2(const float v1[2], const float v2[2]) UNUSED_RESULT_ATTR; -MINLINE int equals_v3v3(const float a[3], const float b[3]) UNUSED_RESULT_ATTR; -MINLINE int compare_v2v2(const float a[2], const float b[2], const float limit) UNUSED_RESULT_ATTR; -MINLINE int compare_v3v3(const float a[3], const float b[3], const float limit) UNUSED_RESULT_ATTR; -MINLINE int compare_len_v3v3(const float a[3], const float b[3], const float limit) UNUSED_RESULT_ATTR; - -MINLINE int compare_v4v4(const float a[4], const float b[4], const float limit) UNUSED_RESULT_ATTR; -MINLINE int equals_v4v4(const float a[4], const float b[4]) UNUSED_RESULT_ATTR; +MINLINE bool is_zero_v2(const float a[3]) UNUSED_RESULT_ATTR; +MINLINE bool is_zero_v3(const float a[3]) UNUSED_RESULT_ATTR; +MINLINE bool is_zero_v4(const float a[4]) UNUSED_RESULT_ATTR; + +MINLINE bool is_finite_v2(const float a[3]) UNUSED_RESULT_ATTR; +MINLINE bool is_finite_v3(const float a[3]) UNUSED_RESULT_ATTR; +MINLINE bool is_finite_v4(const float a[4]) UNUSED_RESULT_ATTR; + +MINLINE bool is_one_v3(const float a[3]) UNUSED_RESULT_ATTR; + +MINLINE bool equals_v2v2(const float v1[2], const float v2[2]) UNUSED_RESULT_ATTR; +MINLINE bool equals_v3v3(const float a[3], const float b[3]) UNUSED_RESULT_ATTR; +MINLINE bool compare_v2v2(const float a[2], const float b[2], const float limit) UNUSED_RESULT_ATTR; +MINLINE bool compare_v3v3(const float a[3], const float b[3], const float limit) UNUSED_RESULT_ATTR; +MINLINE bool compare_len_v3v3(const float a[3], const float b[3], const float limit) UNUSED_RESULT_ATTR; + +MINLINE bool compare_v4v4(const float a[4], const float b[4], const float limit) UNUSED_RESULT_ATTR; +MINLINE bool equals_v4v4(const float a[4], const float b[4]) UNUSED_RESULT_ATTR; MINLINE float line_point_side_v2(const float l1[2], const float l2[2], const float pt[2]) UNUSED_RESULT_ATTR; |