瀏覽代碼

added getInverse()

Nicolas Cannasse 4 年之前
父節點
當前提交
b42fba73be
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      h3d/Matrix.hx

+ 6 - 0
h3d/Matrix.hx

@@ -347,6 +347,12 @@ class Matrix {
 		initInverse(this);
 	}
 
+	public function getInverse( ?m : h3d.Matrix ) {
+		if( m == null ) m = new h3d.Matrix();
+		m.initInverse(this);
+		return m;
+	}
+
 	public inline function getDeterminant() {
 		return _11 * (_22*_33 - _23*_32) + _12 * (_23*_31 - _21*_33) + _13 * (_21*_32 - _22*_31);
 	}