Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/mesh/editmesh_knife.c')
-rw-r--r--source/blender/editors/mesh/editmesh_knife.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index 2ceb8aeef26..882d3115ba0 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -1400,9 +1400,10 @@ static float knife_snap_size(KnifeTool_OpData *kcd, float maxsize)
{
float density = (float)knife_sample_screen_density(kcd, maxsize * 2.0f);
- density = MAX2(density, 1);
+ if (density < 1.0f)
+ density = 1.0f;
- return MIN2(maxsize / (density * 0.5f), maxsize);
+ return minf(maxsize / (density * 0.5f), maxsize);
}
/* p is closest point on edge to the mouse cursor */