diff options
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r-- | source/blender/bmesh/operators/bmo_dissolve.c | 2 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_extrude.c | 6 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_removedoubles.c | 2 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_similar.c | 4 | ||||
-rw-r--r-- | source/blender/bmesh/tools/bmesh_intersect.c | 4 |
5 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/bmesh/operators/bmo_dissolve.c b/source/blender/bmesh/operators/bmo_dissolve.c index 8cd9ee14bcb..ecb41363761 100644 --- a/source/blender/bmesh/operators/bmo_dissolve.c +++ b/source/blender/bmesh/operators/bmo_dissolve.c @@ -475,7 +475,7 @@ void bmo_dissolve_limit_exec(BMesh *bm, BMOperator *op) { BMOpSlot *einput = BMO_slot_get(op->slots_in, "edges"); BMOpSlot *vinput = BMO_slot_get(op->slots_in, "verts"); - const float angle_max = (float)M_PI / 2.0f; + const float angle_max = M_PI_2; const float angle_limit = min_ff(angle_max, BMO_slot_float_get(op->slots_in, "angle_limit")); const bool do_dissolve_boundaries = BMO_slot_bool_get(op->slots_in, "use_dissolve_boundaries"); const BMO_Delimit delimit = BMO_slot_int_get(op->slots_in, "delimit"); diff --git a/source/blender/bmesh/operators/bmo_extrude.c b/source/blender/bmesh/operators/bmo_extrude.c index 88b53b63abb..aa92c3054cd 100644 --- a/source/blender/bmesh/operators/bmo_extrude.c +++ b/source/blender/bmesh/operators/bmo_extrude.c @@ -608,10 +608,10 @@ static void calc_solidify_normals(BMesh *bm) } else { /* only one face attached to that edge */ - /* an edge without another attached- the weight on this is - * undefined, M_PI / 2 is 90d in radians and that seems good enough */ + /* an edge without another attached- the weight on this is undefined, + * M_PI_2 is 90d in radians and that seems good enough */ copy_v3_v3(edge_normal, f1->no); - mul_v3_fl(edge_normal, M_PI / 2); + mul_v3_fl(edge_normal, M_PI_2); } add_v3_v3(e->v1->no, edge_normal); diff --git a/source/blender/bmesh/operators/bmo_removedoubles.c b/source/blender/bmesh/operators/bmo_removedoubles.c index 9c8b9ca160d..871bee64c19 100644 --- a/source/blender/bmesh/operators/bmo_removedoubles.c +++ b/source/blender/bmesh/operators/bmo_removedoubles.c @@ -529,7 +529,7 @@ static void bmesh_find_doubles_common(BMesh *bm, BMOperator *op, const float dist = BMO_slot_float_get(op->slots_in, "dist"); const float dist_sq = dist * dist; - const float dist3 = (M_SQRT3 + 0.00005f) * dist; /* Just above sqrt(3) */ + const float dist3 = ((float)M_SQRT3 + 0.00005f) * dist; /* Just above sqrt(3) */ /* Test whether keep_verts arg exists and is non-empty */ if (BMO_slot_exists(op->slots_in, "keep_verts")) { diff --git a/source/blender/bmesh/operators/bmo_similar.c b/source/blender/bmesh/operators/bmo_similar.c index 02462e380b4..5f8438919df 100644 --- a/source/blender/bmesh/operators/bmo_similar.c +++ b/source/blender/bmesh/operators/bmo_similar.c @@ -412,10 +412,10 @@ void bmo_similar_edges_exec(BMesh *bm, BMOperator *op) /* compute the angle between the two edges */ angle = angle_normalized_v3v3(e_ext[i].dir, e_ext[indices[idx]].dir); - if (angle > (float)(M_PI / 2.0)) /* use the smallest angle between the edges */ + if (angle > (float)M_PI_2) /* use the smallest angle between the edges */ angle = fabsf(angle - (float)M_PI); - if (angle / (float)(M_PI / 2.0) <= thresh) { + if (angle / (float)M_PI_2 <= thresh) { BMO_elem_flag_enable(bm, e, EDGE_MARK); cont = false; } diff --git a/source/blender/bmesh/tools/bmesh_intersect.c b/source/blender/bmesh/tools/bmesh_intersect.c index 8a1569630fa..26b53a21709 100644 --- a/source/blender/bmesh/tools/bmesh_intersect.c +++ b/source/blender/bmesh/tools/bmesh_intersect.c @@ -541,7 +541,7 @@ static void bm_isect_tri_tri( if (((1 << i_b_e0) | (1 << i_b_e1)) & b_mask) continue; fac = line_point_factor_v3(fv_a[i_a]->co, fv_b[i_b_e0]->co, fv_b[i_b_e1]->co); - if ((fac > 0.0f - s->epsilon.eps) && (fac < 1.0 + s->epsilon.eps)) { + if ((fac > 0.0f - s->epsilon.eps) && (fac < 1.0f + s->epsilon.eps)) { float ix[3]; interp_v3_v3v3(ix, fv_b[i_b_e0]->co, fv_b[i_b_e1]->co, fac); if (len_squared_v3v3(ix, fv_a[i_a]->co) <= s->epsilon.eps2x_sq) { @@ -579,7 +579,7 @@ static void bm_isect_tri_tri( if (((1 << i_a_e0) | (1 << i_a_e1)) & a_mask) continue; fac = line_point_factor_v3(fv_b[i_b]->co, fv_a[i_a_e0]->co, fv_a[i_a_e1]->co); - if ((fac > 0.0 - s->epsilon.eps) && (fac < 1.0 + s->epsilon.eps)) { + if ((fac > 0.0f - s->epsilon.eps) && (fac < 1.0f + s->epsilon.eps)) { float ix[3]; interp_v3_v3v3(ix, fv_a[i_a_e0]->co, fv_a[i_a_e1]->co, fac); if (len_squared_v3v3(ix, fv_b[i_b]->co) <= s->epsilon.eps2x_sq) { |