use macros RAD2DEG & DEG2RAD rather then multiplying by 180.0/M_PI or M_PI/180.0

This commit is contained in:
2011-09-17 09:43:51 +00:00
parent 18d59e2645
commit d4898f9c40
20 changed files with 56 additions and 58 deletions

View File

@@ -82,8 +82,8 @@ void TransformReader::dae_rotate_to_mat4(COLLADAFW::Transformation *tm, float m[
{
COLLADAFW::Rotate *ro = (COLLADAFW::Rotate*)tm;
COLLADABU::Math::Vector3& axis = ro->getRotationAxis();
float angle = (float)(ro->getRotationAngle() * M_PI / 180.0f);
float ax[] = {axis[0], axis[1], axis[2]};
const float angle = (float)DEG2RAD(ro->getRotationAngle());
const float ax[] = {axis[0], axis[1], axis[2]};
// float quat[4];
// axis_angle_to_quat(quat, axis, angle);
// quat_to_mat4(m, quat);