diff options
Diffstat (limited to 'source/blender/editors/transform/transform_conversions.c')
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 3163e8ffce4..2103073d5e9 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -238,7 +238,7 @@ static void set_prop_dist(TransInfo *t, const bool with_dist) if ((tob->flag & TD_SELECTED) == 0) { TransData *td; int i; - float dist, vec[3]; + float dist_sq, vec[3]; tob->rdist = -1.0f; // signal for next loop @@ -253,9 +253,9 @@ static void set_prop_dist(TransInfo *t, const bool with_dist) sub_v3_v3(vec, vec_p); } - dist = len_squared_v3(vec); - if ((tob->rdist == -1.0f) || (dist < (tob->rdist * tob->rdist))) { - tob->rdist = sqrtf(dist); + dist_sq = len_squared_v3(vec); + if ((tob->rdist == -1.0f) || (dist_sq < (tob->rdist * tob->rdist))) { + tob->rdist = sqrtf(dist_sq); } } else { |