[Bf-blender-cvs] [fa021e3] master: Code cleanup: Use new SQUARE() macro to get squared distance threshold
Sergey Sharybin
noreply at git.blender.org
Mon Oct 13 17:48:11 CEST 2014
Commit: fa021e3a44ecb80a9caa8ad46ecc0d794bd26b7c
Author: Sergey Sharybin
Date: Mon Oct 13 17:47:36 2014 +0200
Branches: master
https://developer.blender.org/rBfa021e3a44ecb80a9caa8ad46ecc0d794bd26b7c
Code cleanup: Use new SQUARE() macro to get squared distance threshold
===================================================================
M source/blender/editors/mask/mask_ops.c
===================================================================
diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c
index b27baaf..704be32 100644
--- a/source/blender/editors/mask/mask_ops.c
+++ b/source/blender/editors/mask/mask_ops.c
@@ -583,7 +583,7 @@ static bool spline_under_mouse_get(const bContext *C,
/* TODO(sergey): Chech whether tessellated spline point is closer
* to the mouse than the spline center.
*/
- if (closest_dist_squared < 32.0f * 32.0f && closest_spline != NULL) {
+ if (closest_dist_squared < SQUARE(32.0f) && closest_spline != NULL) {
*mask_layer_r = closest_layer;
*mask_spline_r = closest_spline;
return true;
More information about the Bf-blender-cvs
mailing list