diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-08-12 09:58:53 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-08-12 09:58:53 +0400 |
commit | eadfddd02a528f1c5450d3795905dbdf669a0062 (patch) | |
tree | 92e5c6507f1b640944068d084dd7b16bad6a5d95 /source/blender/bmesh | |
parent | ab06ec7a24821bd0ee968e72e28c0d9298c68b7d (diff) |
Cleanup: magic numbers
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r-- | source/blender/bmesh/tools/bmesh_bevel.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c index aedc551b5a6..4a9fb677257 100644 --- a/source/blender/bmesh/tools/bmesh_bevel.c +++ b/source/blender/bmesh/tools/bmesh_bevel.c @@ -1869,7 +1869,7 @@ static float sabin_gamma(int n) k2 = k * k; k4 = k2 * k2; k6 = k4 * k2; - y = pow(1.73205080756888 * sqrt(64.0 * k6 - 144.0 * k4 + 135.0 * k2 - 27.0) + 9.0 * k, + y = pow(M_SQRT3 * sqrt(64.0 * k6 - 144.0 * k4 + 135.0 * k2 - 27.0) + 9.0 * k, 1.0 / 3.0); x = 0.480749856769136 * y - (0.231120424783545 * (12.0 * k2 - 9.0)) / y; ans = (k * x + 2.0 * k2 - 1.0) / (x * x * (k * x + 1.0)); @@ -2262,7 +2262,7 @@ static VMesh *make_cube_corner_adj_vmesh(BevelParams *bp) bndv = bndv->next; } /* center vertex */ - w = 0.57735027f; /* 1/sqrt(3) */ + w = (float)(1.0 / M_SQRT3); co[0] = w; co[1] = w; co[2] = w; |