Base: Use std::numeric_limits and std::numbers instead of defines
This commit is contained in:
@@ -429,7 +429,7 @@ bool Matrix4D::toAxisAngle(Vector3d& rclBase,
|
||||
rfAngle = acos(fCos); // in [0,PI]
|
||||
|
||||
if (rfAngle > 0.0) {
|
||||
if (rfAngle < D_PI) {
|
||||
if (rfAngle < std::numbers::pi) {
|
||||
rclDir.x = (dMtrx4D[2][1] - dMtrx4D[1][2]);
|
||||
rclDir.y = (dMtrx4D[0][2] - dMtrx4D[2][0]);
|
||||
rclDir.z = (dMtrx4D[1][0] - dMtrx4D[0][1]);
|
||||
@@ -1013,8 +1013,8 @@ std::array<Matrix4D, 4> Matrix4D::decompose() const
|
||||
residualMatrix = rotationMatrix * residualMatrix;
|
||||
// To keep signs of the scale factors equal
|
||||
if (residualMatrix.determinant() < 0) {
|
||||
rotationMatrix.rotZ(D_PI);
|
||||
residualMatrix.rotZ(D_PI);
|
||||
rotationMatrix.rotZ(std::numbers::pi);
|
||||
residualMatrix.rotZ(std::numbers::pi);
|
||||
}
|
||||
rotationMatrix.inverseGauss();
|
||||
// extract scale
|
||||
|
||||
Reference in New Issue
Block a user