src/Malenki/Math/Matrix.php
public function inverse()
    {
        $det = $this->det();

        if ($det == 0) {
            throw new \RuntimeException('Cannot get inverse matrix: determinant is nul!');
        }

        return $this->adjugate()->multiply(1 / $det);
    }
public function inverse()
    {
        $det = $this->det();

        if ($det == 0) {
            throw new \RuntimeException('Cannot get inverse matrix: determinant is nul!');
        }

        return $this->adjugate()->multiply(1 / $det);
    }
public function inverse ( ) { $ det = $ this -> det ( ) ; if ( $ det == 0 ) { throw new \ RuntimeException ( 'Cannot get inverse matrix: determinant is nul!' ) ; } return $ this -> adjugate ( ) -> multiply ( 1 / $ det ) ; }
Gets inverse matrix.

Inverse matrix is get if and only if the determinant is not null.

@throw \RuntimeException If determinant is null.
@access public
@return Matrix
Gets inverse matrix .