You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/3d/normalsExample/src/ofApp.cpp
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -22,8 +22,8 @@ void ofApp::setup(){
22
22
23
23
//loop around and make verts in a circle, with a bit of a z-wave
24
24
for (int i = 0; i < max; i++){
25
-
float step = 2*PI/max; // step size around circle
26
-
float theta = ofMap(i, 0, max-1, 0, 2*PI - step); //map i as circle divisions to actual radian values around the circle (note we don't go quite all the way around by one step, because it will be the same as where we started, so we'll just index that starting vertex when we make faces)
25
+
float step = glm::two_pi<float>()/max; // step size around circle
26
+
float theta = ofMap(i, 0, max-1, 0, glm::two_pi<float>() - step); //map i as circle divisions to actual radian values around the circle (note we don't go quite all the way around by one step, because it will be the same as where we started, so we'll just index that starting vertex when we make faces)
27
27
28
28
float prevTheta = theta - step; //one step back
29
29
float nextTheta = theta + step; // one step forward
0 commit comments