diff --git a/src/osgPlugins/lwo/Object.cpp b/src/osgPlugins/lwo/Object.cpp index a7d7d59ee..a082b9ef1 100644 --- a/src/osgPlugins/lwo/Object.cpp +++ b/src/osgPlugins/lwo/Object.cpp @@ -37,9 +37,10 @@ namespace x /= r; float a; if (x < 0 && y >= 0) a = osg::PI_2 - acosf(-x); - if (x < 0 && y < 0) a = acosf(-x) + osg::PI_2; - if (x >= 0 && y >= 0) a = acosf(x) + 3 * osg::PI_2; - if (x >= 0 && y < 0) a = 3 * osg::PI_2 - acosf(x); + else if (x < 0 && y < 0) a = acosf(-x) + osg::PI_2; + else if (x >= 0 && y >= 0) a = acosf(x) + 3 * osg::PI_2; + else if (x >= 0 && y < 0) a = 3 * osg::PI_2 - acosf(x); + else a = 0.0f; return a/osg::PI/2; }