diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-18 16:35:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-18 16:37:58 +0300 |
commit | 29039e5c7457c2061787d3f22dce27afcae25c71 (patch) | |
tree | da06fbbb37c18697b0317ca024cd2191bfcece3e /source/blender/blenlib/intern/math_vector_inline.c | |
parent | 606f3c74d36bbbe6b7e3aeae962176a89355a552 (diff) |
Cleanup: remove compare_len_squared utility
There isn't any advantage to this over comparing the squared length.
Diffstat (limited to 'source/blender/blenlib/intern/math_vector_inline.c')
-rw-r--r-- | source/blender/blenlib/intern/math_vector_inline.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/source/blender/blenlib/intern/math_vector_inline.c b/source/blender/blenlib/intern/math_vector_inline.c index 80bdeec5949..f22b2a7a457 100644 --- a/source/blender/blenlib/intern/math_vector_inline.c +++ b/source/blender/blenlib/intern/math_vector_inline.c @@ -952,6 +952,14 @@ MINLINE float len_squared_v3v3(const float a[3], const float b[3]) return dot_v3v3(d, d); } +MINLINE float len_squared_v4v4(const float a[4], const float b[4]) +{ + float d[4]; + + sub_v4_v4v4(d, b, a); + return dot_v4v4(d, d); +} + MINLINE float len_manhattan_v2v2(const float a[2], const float b[2]) { float d[2]; @@ -1197,20 +1205,6 @@ MINLINE bool compare_len_v3v3(const float v1[3], const float v2[3], const float return (dot_v3v3(d, d) <= (limit * limit)); } -MINLINE bool compare_len_squared_v3v3(const float v1[3], const float v2[3], const float limit_sq) -{ - float d[3]; - sub_v3_v3v3(d, v1, v2); - return (dot_v3v3(d, d) <= limit_sq); -} - -MINLINE bool compare_len_squared_v4v4(const float v1[4], const float v2[4], const float limit_sq) -{ - float d[4]; - sub_v4_v4v4(d, v1, v2); - return (dot_v4v4(d, d) <= limit_sq); -} - /** * <pre> * + l1 |