瀏覽代碼

change @:increment implementation

ncannasse 9 年之前
父節點
當前提交
8abf2c057a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      hxd/net/Macros.hx

+ 1 - 1
hxd/net/Macros.hx

@@ -1177,7 +1177,7 @@ class Macros {
 		var needRef = false;
 		if( t.increment != null ) {
 			needRef = true;
-			mark = macro if( hxd.Math.abs(this.$fname - this.$rname) > $v{ t.increment } ) { this.$rname = this.$fname; $mark; };
+			mark = macro if( Math.floor(this.$fname / $v{t.increment}) != this.$rname ) { this.$rname = Math.floor(this.$fname / $v{t.increment}); $mark; };
 		}
 		if( t.condSend != null ) {
 			function loop(e:Expr) {