Skip to content

Commit

Permalink
examples fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitre committed May 1, 2024
1 parent bce0a44 commit b22e9e5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/3d/3DPrimitivesExample/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ void ofApp::draw() {
ofPushMatrix();
if (bottomCap.getNumNormals() > 0) {
ofTranslate(bottomCap.getNormal(0) * cone.getHeight()*.5);
ofRotateDeg(sin(ofGetElapsedTimef() * 5) * RAD_TO_DEG, 1, 0, 0);
ofRotateDeg( glm::degrees( sin(ofGetElapsedTimef() * 5) ), 1, 0, 0);
bottomCap.draw();
}
ofPopMatrix();
Expand Down
2 changes: 1 addition & 1 deletion examples/gl/multiLightExample/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void ofApp::update() {
sin(ofGetElapsedTimef()*.8f) * radius * 2 + center.y,
-cos(ofGetElapsedTimef()*.8f) * radius * 2 + center.z);

spotLight.setOrientation( { 0, cos(ofGetElapsedTimef()) * RAD_TO_DEG, 0 } );
spotLight.setOrientation( { 0, glm::degrees(cos(ofGetElapsedTimef())), 0 } );
spotLight.setPosition( mouseX, mouseY, 200);
}

Expand Down
2 changes: 1 addition & 1 deletion examples/ios/PrimitivesExample/src/ofApp.mm
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@
glPushMatrix();
if(bottomCap.getNumNormals() > 0 ) {
ofTranslate( bottomCap.getNormal(0) * cone.getHeight()*.5 );
glRotatef( sin(ofGetElapsedTimef()*5) * RAD_TO_DEG, 1, 0, 0);
glRotatef( glm::degrees( sin(ofGetElapsedTimef()*5) ), 1, 0, 0);
bottomCap.draw();
}
glPopMatrix();
Expand Down
2 changes: 1 addition & 1 deletion examples/ios/iosCoreMotionLegacyExample/src/ofApp.mm
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
ofSetColor(54);
ofDrawBitmapString("Multitouch and Accel Example", 10, 20);

float angle = 180 - RAD_TO_DEG * atan2(accelerometerData.y, accelerometerData.x);
float angle = 180.0 - glm::degrees( atan2(accelerometerData.y, accelerometerData.x) );

ofEnableAlphaBlending();
ofSetColor(255);
Expand Down

0 comments on commit b22e9e5

Please sign in to comment.