away3d / away3d-core-openfl

Away3D engine for OpenFL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Math.isNaN doesn't work in Drag3D.intersect()

7ujian opened this issue · comments

Hi there,

I noticed a bug in the away3d-core-openfl. The default values of x, y in the private function intersect(?x:Float, ?y:Float):Void {} params are "null" instead of "NaN".

Thus the Math.isNan(x) test always fails. Changing the "Math.isNaN(x)" to "x == null" seems work.

Thank you.
Jian

hi, I also find this bug, but solved another way. In updateDrag() function:

intersect(_view.mouseX, _view.mouseY);

PR merged and new version 1.2.0 available via haxelib.