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/AnimationImporter.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/AnimationImporter.cpp')
-rw-r--r-- | source/blender/collada/AnimationImporter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp index 43428f57d4f..a176b6eb4cd 100644 --- a/source/blender/collada/AnimationImporter.cpp +++ b/source/blender/collada/AnimationImporter.cpp @@ -170,9 +170,9 @@ void AnimationImporter::fcurve_deg_to_rad(FCurve *cu) { for (unsigned int i = 0; i < cu->totvert; i++) { // TODO convert handles too - cu->bezt[i].vec[1][1] *= M_PI / 180.0f; - cu->bezt[i].vec[0][1] *= M_PI / 180.0f; - cu->bezt[i].vec[2][1] *= M_PI / 180.0f; + cu->bezt[i].vec[1][1] *= DEG2RADF(1.0f); + cu->bezt[i].vec[0][1] *= DEG2RADF(1.0f); + cu->bezt[i].vec[2][1] *= DEG2RADF(1.0f); } } @@ -741,7 +741,7 @@ void AnimationImporter::apply_matrix_curves( Object * ob, std::vector<FCurve*>& mat4_to_quat(rot, mat); /*for ( int i = 0 ; i < 4 ; i ++ ) { - rot[i] = rot[i] * (180 / M_PI); + rot[i] = RAD2DEGF(rot[i]); }*/ copy_v3_v3(loc, mat[3]); mat4_to_size(scale, mat); |