Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Blackbourn <chrisbblend@gmail.com>2022-07-23 00:08:59 +0300
committerChris Blackbourn <chrisbblend@gmail.com>2022-07-23 00:12:13 +0300
commit82467e5dcf985123a2b47692b133d50b08d6fa6b (patch)
treec85690b7595b866454278ce5c6040f6edd3e9803 /source/blender/bmesh
parent80b2fc59d11d5814afe7e219c535525a8d494c17 (diff)
Cleanup: Typo with uv sphere normal creation
Regression from 087f27a52f78
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r--source/blender/bmesh/operators/bmo_primitive.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/bmesh/operators/bmo_primitive.c b/source/blender/bmesh/operators/bmo_primitive.c
index 2ed0964d735..c60ffbedb94 100644
--- a/source/blender/bmesh/operators/bmo_primitive.c
+++ b/source/blender/bmesh/operators/bmo_primitive.c
@@ -856,9 +856,9 @@ void bmo_create_uvsphere_exec(BMesh *bm, BMOperator *op)
for (a = 0; a <= tot; a++) {
/* Going in this direction, then edge extruding, makes normals face outward */
float sin_phi, cos_phi;
- sin_cos_from_fraction(a, tot, &sin_phi, &cos_phi);
+ sin_cos_from_fraction(a, 2 * tot, &sin_phi, &cos_phi);
- vec[0] = 0.0;
+ vec[0] = 0.0f;
vec[1] = rad * sin_phi;
vec[2] = rad * cos_phi;
eve = BM_vert_create(bm, vec, NULL, BM_CREATE_NOP);
@@ -1391,7 +1391,7 @@ void bmo_create_cone_exec(BMesh *bm, BMOperator *op)
BMFace **side_faces = MEM_mallocN(sizeof(*side_faces) * side_faces_len, __func__);
for (int i = 0; i < segs; i++) {
- /* Calculate with doubles for higher precision, see: T87779. */
+ /* Calculate with higher precision, see: T87779. */
float sin_phi, cos_phi;
sin_cos_from_fraction(i, segs, &sin_phi, &cos_phi);