diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-14 12:24:49 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-14 12:24:49 +0400 |
commit | 8d496b3bf2c58a0a161c20c987f414953a6d1e87 (patch) | |
tree | 6545f7a133d43f99cda49bdd8225884065ae84dd /source/blender/blenlib/intern | |
parent | b2943dad26dc02a28e61115a415e3b0ac6a6ef62 (diff) |
fix [#32315] Circle select unreliable when in vertex+edge select mode
dist_squared_to_line_segment_v2() was returning the sqrt'd value in some cases.
also use int's for edge_inside_circle() rather then shorts since it was doing int/float/short conversions and we're now using int's for screen vars in more places.
Diffstat (limited to 'source/blender/blenlib/intern')
-rw-r--r-- | source/blender/blenlib/intern/math_geom.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c index 7d405ecda9c..76f4f26b728 100644 --- a/source/blender/blenlib/intern/math_geom.c +++ b/source/blender/blenlib/intern/math_geom.c @@ -188,7 +188,7 @@ float dist_squared_to_line_segment_v2(const float p[2], const float l1[2], const if (len == 0.0f) { rc[0] = p[0] - l1[0]; rc[1] = p[1] - l1[1]; - return (float)(sqrt(rc[0] * rc[0] + rc[1] * rc[1])); + return (rc[0] * rc[0] + rc[1] * rc[1]); } labda = (rc[0] * (p[0] - l1[0]) + rc[1] * (p[1] - l1[1])) / len; |