Commit: 82467e5dcf985123a2b47692b133d50b08d6fa6b
Author: Chris Blackbourn
Date:   Sat Jul 23 09:08:59 2022 +1200
Branches: master
https://developer.blender.org/rB82467e5dcf985123a2b47692b133d50b08d6fa6b

Cleanup: Typo with uv sphere normal creation

Regression from 087f27a52f78

===================================================================

M       source/blender/bmesh/operators/bmo_primitive.c

===================================================================

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);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to