diff --git a/dlib/math/matrix.d b/dlib/math/matrix.d index 78c24011..60178ea7 100644 --- a/dlib/math/matrix.d +++ b/dlib/math/matrix.d @@ -562,7 +562,7 @@ struct Matrix(T, size_t N) */ static if (N == 4) { - bool isAffine() @property + bool isAffine() const @property do { return (a41 == 0.0 @@ -612,7 +612,7 @@ struct Matrix(T, size_t N) */ static if (N == 1) { - Matrix!(T,N) inverse() @property + Matrix!(T,N) inverse() const @property do { Matrix!(T,N) res; @@ -623,7 +623,7 @@ struct Matrix(T, size_t N) else static if (N == 2) { - Matrix!(T,N) inverse() @property + Matrix!(T,N) inverse() const @property do { Matrix!(T,N) res; @@ -641,7 +641,7 @@ struct Matrix(T, size_t N) else static if (N == 3) { - Matrix!(T,N) inverse() @property + Matrix!(T,N) inverse() const @property do { T d = determinant; @@ -667,7 +667,7 @@ struct Matrix(T, size_t N) } else { - Matrix!(T,N) inverse() @property + Matrix!(T,N) inverse() const @property do { Matrix!(T,N) res; @@ -840,7 +840,7 @@ struct Matrix(T, size_t N) this[i, j] = v.arrayof[j]; } - Vector!(T,N) getColumn(size_t j) + Vector!(T,N) getColumn(size_t j) const { Vector!(T,N) res; for (size_t i = 0; i < N; i++) diff --git a/dlib/math/quaternion.d b/dlib/math/quaternion.d index a3fb47f2..c0c3907c 100644 --- a/dlib/math/quaternion.d +++ b/dlib/math/quaternion.d @@ -267,7 +267,7 @@ struct Quaternion(T) /** * Convert to 4x4 matrix */ - Matrix!(T,4) toMatrix4x4() + Matrix!(T,4) toMatrix4x4() const { auto mat = Matrix!(T,4).identity; @@ -297,7 +297,7 @@ struct Quaternion(T) /** * Convert to 3x3 matrix */ - Matrix!(T,3) toMatrix3x3() + Matrix!(T,3) toMatrix3x3() const { auto mat = Matrix!(T,3).identity;