use macros RAD2DEG & DEG2RAD rather then multiplying by 180.0/M_PI or M_PI/180.0
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user