diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-11-22 20:11:46 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-11-22 20:21:52 +0300 |
commit | 25c5542fe78abe79cdf9d2ec46607de01762f32e (patch) | |
tree | fd88140b57603458ca6251d1f1dcb3d6b0e40c26 /source/blender/bmesh | |
parent | 789eaa0f5bda185d78e25d4fd252054c9f39e955 (diff) |
Math Lib: add constant: M_SQRT1_3 1/sqrt(3)
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r-- | source/blender/bmesh/tools/bmesh_bevel.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c index 99ff6996b71..c3d1ca86fbf 100644 --- a/source/blender/bmesh/tools/bmesh_bevel.c +++ b/source/blender/bmesh/tools/bmesh_bevel.c @@ -2229,7 +2229,6 @@ static VMesh *make_cube_corner_adj_vmesh(BevelParams *bp) BoundVert *bndv; int i, j, k, ns2; float co[3], coc[3]; - float w; if (r == PRO_SQUARE_R) return make_cube_corner_straight(mem_arena, nseg); @@ -2262,10 +2261,8 @@ static VMesh *make_cube_corner_adj_vmesh(BevelParams *bp) bndv = bndv->next; } /* center vertex */ - w = (float)(1.0 / M_SQRT3); - co[0] = w; - co[1] = w; - co[2] = w; + copy_v3_fl(co, M_SQRT1_3); + if (nseg > 2) { if (r > 1.5f) mul_v3_fl(co, 1.4f); |