Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix 1x1 matrices issue #31

  • Loading branch information...
commit a7b159e046a50e5efca198e1d7ca51216a823a7d 1 parent d9d66ba
@Dav1dde authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 gl3n/linalg.d
View
6 gl3n/linalg.d
@@ -1691,15 +1691,15 @@ struct Matrix(type, int rows_, int cols_) if((rows_ > 0) && (cols_ > 0)) {
}
- static if((rows == cols) && (rows <= 4)) {
- /// Returns an inverted copy of the current matrix (nxn matrices, n <= 4).
+ static if((rows == cols) && (rows >= 2) && (rows <= 4)) {
+ /// Returns an inverted copy of the current matrix (nxn matrices, 2 >= n <= 4).
@property Matrix inverse() const {
Matrix mat;
invert(mat);
return mat;
}
- /// Inverts the current matrix (nxn matrices, n <= 4).
+ /// Inverts the current matrix (nxn matrices, 2 >= n <= 4).
void invert() {
// workaround Issue #11238
// uses a temporary instead of invert(this)
Please sign in to comment.
Something went wrong with that request. Please try again.