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/AnimationExporter.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/AnimationExporter.cpp')
-rw-r--r-- | source/blender/collada/AnimationExporter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/collada/AnimationExporter.cpp b/source/blender/collada/AnimationExporter.cpp index 2ea10111bb9..ae568e69936 100644 --- a/source/blender/collada/AnimationExporter.cpp +++ b/source/blender/collada/AnimationExporter.cpp @@ -577,7 +577,7 @@ void AnimationExporter::get_source_values(BezTriple *bezt, COLLADASW::InputSeman case COLLADASW::InputSemantic::OUTPUT: *length = 1; if (rotation) { - values[0] = (bezt->vec[1][1]) * 180.0f/M_PI; + values[0] = RAD2DEGF(bezt->vec[1][1]); } else { values[0] = bezt->vec[1][1]; @@ -593,7 +593,7 @@ void AnimationExporter::get_source_values(BezTriple *bezt, COLLADASW::InputSeman values[1] = 0; } else if (rotation) { - values[1] = (bezt->vec[0][1]) * 180.0f/M_PI; + values[1] = RAD2DEGF(bezt->vec[0][1]); } else { values[1] = bezt->vec[0][1]; } @@ -608,7 +608,7 @@ void AnimationExporter::get_source_values(BezTriple *bezt, COLLADASW::InputSeman values[1] = 0; } else if (rotation) { - values[1] = (bezt->vec[2][1]) * 180.0f/M_PI; + values[1] = RAD2DEGF(bezt->vec[2][1]); } else { values[1] = bezt->vec[2][1]; } @@ -688,7 +688,7 @@ std::string AnimationExporter::create_source_from_array(COLLADASW::InputSemantic // val = convert_time(val); //else if (is_rot) - val *= 180.0f / M_PI; + val = RAD2DEGF(val); source.appendValues(val); } |