From 12bfb6d79a1ca805c60f494cd070491552dad0e7 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 27 Nov 2008 09:45:41 +0000 Subject: [PATCH] From Jean-Sebastien Guay, "osgautocapture uses M_PI to convert degrees to radians, which didn't compile on Win32. Switched to using osg::DegreesToRadians. Also removed the "convert to radians" comment on each line, as the code clearly conveys this without needing a comment now." --- examples/osgautocapture/osgautocapture.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/osgautocapture/osgautocapture.cpp b/examples/osgautocapture/osgautocapture.cpp index b067dff51..13b685422 100644 --- a/examples/osgautocapture/osgautocapture.cpp +++ b/examples/osgautocapture/osgautocapture.cpp @@ -211,11 +211,11 @@ int main( int argc, char **argv ) if (arguments.read("--camera", lat, lon, alt, heading, incline, roll)) { camera_specified=true; - lat = lat * M_PI / 180.0; // Convert to radians - lon = lon * M_PI / 180.0; // Convert to radians - heading = heading * M_PI / 180.0; // Convert to radians - incline = incline * M_PI / 180.0; // Convert to radians - roll = roll * M_PI / 180.0; // Convert to radians + lat = osg::DegreesToRadians(lat); + lon = osg::DegreesToRadians(lon); + heading = osg::DegreesToRadians(heading); + incline = osg::DegreesToRadians(incline); + roll = osg::DegreesToRadians(roll); } // load the data