diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-09-17 13:43:51 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-09-17 13:43:51 +0400 |
commit | d4898f9c40dd008b14eab053864cd2b035652827 (patch) | |
tree | 59065a423ca156385153195372e66c25b9e28700 /source/blender/collada/DocumentImporter.cpp | |
parent | 18d59e2645ed486e2530160da50abd87c652ed7a (diff) |
use macros RAD2DEG & DEG2RAD rather then multiplying by 180.0/M_PI or M_PI/180.0
Diffstat (limited to 'source/blender/collada/DocumentImporter.cpp')
-rw-r--r-- | source/blender/collada/DocumentImporter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp index 366837421e3..2387c9a1465 100644 --- a/source/blender/collada/DocumentImporter.cpp +++ b/source/blender/collada/DocumentImporter.cpp @@ -816,7 +816,7 @@ bool DocumentImporter::writeCamera( const COLLADAFW::Camera* camera ) double aspect = camera->getAspectRatio().getValue(); double xfov = aspect*yfov; // xfov is in degrees, cam->lens is in millimiters - cam->lens = angle_to_lens((float)xfov*(M_PI/180.0f)); + cam->lens = angle_to_lens(DEG2RADF(xfov));; } break; } @@ -837,7 +837,7 @@ bool DocumentImporter::writeCamera( const COLLADAFW::Camera* camera ) { double x = camera->getXFov().getValue(); // x is in degrees, cam->lens is in millimiters - cam->lens = angle_to_lens((float)x*(M_PI/180.0f)); + cam->lens = angle_to_lens(DEG2RADF(x)); } break; } @@ -854,7 +854,7 @@ bool DocumentImporter::writeCamera( const COLLADAFW::Camera* camera ) { double yfov = camera->getYFov().getValue(); // yfov is in degrees, cam->lens is in millimiters - cam->lens = angle_to_lens((float)yfov*(M_PI/180.0f)); + cam->lens = angle_to_lens(DEG2RADF(yfov)); } break; } |