-- Bugfix #3072: As discussed on IRC, matrix.invert() should throw a
ValueError exception if matrix is singular.
This commit is contained in:
@@ -653,19 +653,19 @@ class Quaternion:
|
||||
|
||||
def negate():
|
||||
"""
|
||||
Set the quaternion to it's negative.
|
||||
Set the quaternion to its negative.
|
||||
@return: a copy of itself
|
||||
"""
|
||||
|
||||
def conjugate():
|
||||
"""
|
||||
Set the quaternion to it's conjugate.
|
||||
Set the quaternion to its conjugate.
|
||||
@return: a copy of itself
|
||||
"""
|
||||
|
||||
def inverse():
|
||||
"""
|
||||
Set the quaternion to it's inverse
|
||||
Set the quaternion to its inverse
|
||||
@return: a copy of itself
|
||||
"""
|
||||
|
||||
@@ -762,7 +762,7 @@ class Matrix:
|
||||
|
||||
def transpose():
|
||||
"""
|
||||
Set the matrix to it's transpose.
|
||||
Set the matrix to its transpose.
|
||||
@return: a copy of itself
|
||||
"""
|
||||
|
||||
@@ -775,8 +775,9 @@ class Matrix:
|
||||
|
||||
def invert():
|
||||
"""
|
||||
Set the matrix to it's inverse.
|
||||
Set the matrix to its inverse.
|
||||
@return: a copy of itself
|
||||
@raise ValueError: When matrix is singular.
|
||||
"""
|
||||
|
||||
def rotationPart():
|
||||
|
||||
@@ -228,7 +228,8 @@ PyObject *Matrix_Invert(MatrixObject * self)
|
||||
//transpose
|
||||
//Matrix_Transpose(self);
|
||||
} else {
|
||||
printf("Matrix.invert: matrix does not have an inverse\n");
|
||||
return EXPP_ReturnPyObjError(PyExc_ValueError,
|
||||
"matrix does not have an inverse");
|
||||
}
|
||||
return EXPP_incr_ret((PyObject*)self);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user