diff options
Diffstat (limited to 'src/gui/math3d/qmatrix4x4.cpp')
-rw-r--r-- | src/gui/math3d/qmatrix4x4.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/math3d/qmatrix4x4.cpp b/src/gui/math3d/qmatrix4x4.cpp index 6b18e1ab03..045fa210c4 100644 --- a/src/gui/math3d/qmatrix4x4.cpp +++ b/src/gui/math3d/qmatrix4x4.cpp @@ -126,7 +126,7 @@ QMatrix4x4::QMatrix4x4(const float *values) */ /*! - \fn QMatrix4x4::QMatrix4x4(const QGenericMatrix<N, M, float>& matrix) + \fn template <int N, int M> QMatrix4x4::QMatrix4x4(const QGenericMatrix<N, M, float>& matrix) Constructs a 4x4 matrix from the left-most 4 columns and top-most 4 rows of \a matrix. If \a matrix has less than 4 columns or rows, @@ -146,7 +146,7 @@ QMatrix4x4::QMatrix4x4(const float *values) */ /*! - \fn QMatrix4x4 qGenericMatrixToMatrix4x4(const QGenericMatrix<N, M, float>& matrix) + \fn template <int N, int M> QMatrix4x4 qGenericMatrixToMatrix4x4(const QGenericMatrix<N, M, float>& matrix) \relates QMatrix4x4 \obsolete @@ -1128,7 +1128,7 @@ void QMatrix4x4::rotate(float angle, float x, float y, float z) s = 0.0f; c = -1.0f; } else { - float a = angle * M_PI / 180.0f; + float a = qDegreesToRadians(angle); c = std::cos(a); s = std::sin(a); } @@ -1237,7 +1237,7 @@ void QMatrix4x4::projectedRotate(float angle, float x, float y, float z) s = 0.0f; c = -1.0f; } else { - float a = angle * M_PI / 180.0f; + float a = qDegreesToRadians(angle); c = std::cos(a); s = std::sin(a); } @@ -1496,7 +1496,7 @@ void QMatrix4x4::perspective(float verticalAngle, float aspectRatio, float nearP // Construct the projection. QMatrix4x4 m(1); - float radians = (verticalAngle / 2.0f) * M_PI / 180.0f; + float radians = qDegreesToRadians(verticalAngle / 2.0f); float sine = std::sin(radians); if (sine == 0.0f) return; |