Ver Fonte

Return this for normalize for h2d.col.Point

ShiroSmith há 5 anos atrás
pai
commit
769c2e2e78
1 ficheiros alterados com 2 adições e 0 exclusões
  1. 2 0
      h2d/col/Point.hx

+ 2 - 0
h2d/col/Point.hx

@@ -67,6 +67,7 @@ class Point {
 		if( k < Math.EPSILON ) k = 0 else k = Math.invSqrt(k);
 		x *= k;
 		y *= k;
+		return this;
 	}
 
 	public inline function normalizeFast() {
@@ -74,6 +75,7 @@ class Point {
 		k = Math.invSqrt(k);
 		x *= k;
 		y *= k;
+		return this;
 	}
 
 	public inline function set(x,y) {