From b22e9e5cc75c8a2945b3b002bfdb518d694cbb2a Mon Sep 17 00:00:00 2001 From: Dimitre Date: Wed, 1 May 2024 19:08:51 -0300 Subject: [PATCH] examples fix --- examples/3d/3DPrimitivesExample/src/ofApp.cpp | 2 +- examples/gl/multiLightExample/src/ofApp.cpp | 2 +- examples/ios/PrimitivesExample/src/ofApp.mm | 2 +- examples/ios/iosCoreMotionLegacyExample/src/ofApp.mm | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/3d/3DPrimitivesExample/src/ofApp.cpp b/examples/3d/3DPrimitivesExample/src/ofApp.cpp index dde0bf6ff13..8f1d922fccb 100644 --- a/examples/3d/3DPrimitivesExample/src/ofApp.cpp +++ b/examples/3d/3DPrimitivesExample/src/ofApp.cpp @@ -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(); diff --git a/examples/gl/multiLightExample/src/ofApp.cpp b/examples/gl/multiLightExample/src/ofApp.cpp index b29dcc83f90..e0fee6e526a 100644 --- a/examples/gl/multiLightExample/src/ofApp.cpp +++ b/examples/gl/multiLightExample/src/ofApp.cpp @@ -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); } diff --git a/examples/ios/PrimitivesExample/src/ofApp.mm b/examples/ios/PrimitivesExample/src/ofApp.mm index c94663426f0..db9c3dfa3dc 100644 --- a/examples/ios/PrimitivesExample/src/ofApp.mm +++ b/examples/ios/PrimitivesExample/src/ofApp.mm @@ -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(); diff --git a/examples/ios/iosCoreMotionLegacyExample/src/ofApp.mm b/examples/ios/iosCoreMotionLegacyExample/src/ofApp.mm index 6e8e09d9e5e..9779c4153fe 100644 --- a/examples/ios/iosCoreMotionLegacyExample/src/ofApp.mm +++ b/examples/ios/iosCoreMotionLegacyExample/src/ofApp.mm @@ -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);