diff options
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/brush.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mask.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mball.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mesh.c | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index d6b48c72e89..4885798efb7 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -920,7 +920,7 @@ void BKE_brush_jitter_pos(const Scene *scene, Brush *brush, const float pos[2], do { rand_pos[0] = BLI_rng_get_float(brush_rng) - 0.5f; rand_pos[1] = BLI_rng_get_float(brush_rng) - 0.5f; - } while (len_v2(rand_pos) > 0.5f); + } while (len_squared_v2(rand_pos) > (0.5f * 0.5f)); if (brush->flag & BRUSH_ABSOLUTE_JITTER) { diff --git a/source/blender/blenkernel/intern/mask.c b/source/blender/blenkernel/intern/mask.c index 280093b0d10..997c444982c 100644 --- a/source/blender/blenkernel/intern/mask.c +++ b/source/blender/blenkernel/intern/mask.c @@ -1178,7 +1178,7 @@ static void mask_calc_point_handle(MaskSplinePoint *point, MaskSplinePoint *poin sub_v3_v3v3(v2, bezt->vec[2], bezt->vec[1]); add_v3_v3v3(vec, v1, v2); - if (len_v3(vec) > 1e-3) { + if (len_squared_v3(vec) > (1e-3f * 1e-3f)) { h[0] = vec[1]; h[1] = -vec[0]; h[2] = 0.0f; diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c index 0197415d1dd..6ba69335c6b 100644 --- a/source/blender/blenkernel/intern/mball.c +++ b/source/blender/blenkernel/intern/mball.c @@ -1553,7 +1553,7 @@ static void find_first_points(PROCESS *process, MetaBall *mb, int a) /* find "first points" on Implicit Surface of MetaElemnt ml */ copy_v3_v3(workp, in); workp_v = in_v; - max_len = len_v3v3(out, in); + max_len = len_squared_v3v3(out, in); nx = fabsf((out[0] - in[0]) / process->size); ny = fabsf((out[1] - in[1]) / process->size); @@ -1589,7 +1589,7 @@ static void find_first_points(PROCESS *process, MetaBall *mb, int a) add_cube(process, c_i, c_j, c_k, 2); } } - len = len_v3v3(workp, in); + len = len_squared_v3v3(workp, in); workp_v = tmp_v; } diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index e8504a369e7..31a4a492f35 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -154,7 +154,7 @@ static int customdata_compare(CustomData *c1, CustomData *c2, Mesh *m1, Mesh *m2 int vtot = m1->totvert; for (j = 0; j < vtot; j++, v1++, v2++) { - if (len_v3v3(v1->co, v2->co) > thresh) + if (len_squared_v3v3(v1->co, v2->co) > thresh_sq) return MESHCMP_VERTCOMISMATCH; /* I don't care about normals, let's just do coodinates */ } |