Fixed rest of bevel regression tests.

The calculation of pro_super_r rounded to a non-exact float,
so put in rounding code for the special cases.
This commit is contained in:
Howard Trickey 2019-11-22 13:14:37 -05:00
parent 71ddcf1a08
commit 373e936e3e

@ -7331,6 +7331,15 @@ void BM_mesh_bevel(BMesh *bm,
if (profile >= 0.950f) { /* r ~ 692, so PRO_SQUARE_R is 1e4 */
bp.pro_super_r = PRO_SQUARE_R;
}
else if (fabsf(bp.pro_super_r - PRO_CIRCLE_R) < 1e-4) {
bp.pro_super_r = PRO_CIRCLE_R;
}
else if (fabsf(bp.pro_super_r - PRO_LINE_R) < 1e-4) {
bp.pro_super_r = PRO_LINE_R;
}
else if (bp.pro_super_r < 1e-4) {
bp.pro_super_r = PRO_SQUARE_IN_R;
}
if (bp.offset > 0) {
/* primary alloc */