浏览代码

Add return for h3d.col.Point normalize() and normalizeFast();

ShiroSmith 6 年之前
父节点
当前提交
e8abe20ca8
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      h3d/col/Point.hx

+ 2 - 1
h3d/col/Point.hx

@@ -75,13 +75,13 @@ class Point {
 		return distanceSq(p).sqrt();
 	}
 
-
 	public function normalize() {
 		var k = x * x + y * y + z * z;
 		if( k < hxd.Math.EPSILON ) k = 0 else k = k.invSqrt();
 		x *= k;
 		y *= k;
 		z *= k;
+		return this;
 	}
 
 	public inline function normalizeFast() {
@@ -90,6 +90,7 @@ class Point {
 		x *= k;
 		y *= k;
 		z *= k;
+		return this;
 	}
 
 	public inline function transform( m : Matrix ) {