diff options
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_Wintab.cpp | 4 | ||||
-rw-r--r-- | intern/iksolver/intern/IK_QJacobian.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/intern/ghost/intern/GHOST_Wintab.cpp b/intern/ghost/intern/GHOST_Wintab.cpp index aaf9503b294..2547a38c0d1 100644 --- a/intern/ghost/intern/GHOST_Wintab.cpp +++ b/intern/ghost/intern/GHOST_Wintab.cpp @@ -326,7 +326,7 @@ void GHOST_Wintab::getInput(std::vector<GHOST_WintabInfoWin32> &outWintabInfo) ORIENTATION ort = pkt.pkOrientation; /* Convert raw fixed point data to radians. */ - float altRad = (float)((fabs((float)ort.orAltitude) / (float)m_maxAltitude) * M_PI / 2.0); + float altRad = (float)((fabs((float)ort.orAltitude) / (float)m_maxAltitude) * M_PI_2); float azmRad = (float)(((float)ort.orAzimuth / (float)m_maxAzimuth) * M_PI * 2.0); /* Find length of the stylus' projected vector on the XY plane. */ @@ -334,7 +334,7 @@ void GHOST_Wintab::getInput(std::vector<GHOST_WintabInfoWin32> &outWintabInfo) /* From there calculate X and Y components based on azimuth. */ out.tabletData.Xtilt = sin(azmRad) * vecLen; - out.tabletData.Ytilt = (float)(sin(M_PI / 2.0 - azmRad) * vecLen); + out.tabletData.Ytilt = (float)(sin(M_PI_2 - azmRad) * vecLen); } out.time = pkt.pkTime; diff --git a/intern/iksolver/intern/IK_QJacobian.cpp b/intern/iksolver/intern/IK_QJacobian.cpp index 39c0e6eb348..ea659414b73 100644 --- a/intern/iksolver/intern/IK_QJacobian.cpp +++ b/intern/iksolver/intern/IK_QJacobian.cpp @@ -193,7 +193,7 @@ void IK_QJacobian::InvertSDLS() // DLS. The SDLS damps individual singular values, instead of using a single // damping term. - double max_angle_change = M_PI / 4.0; + double max_angle_change = M_PI_4; double epsilon = 1e-10; int i, j; |