D
DiscoStu
Hello Everyone,
Im having some really weird problems, Im using jdk1.4.1 and Im
using the java.awt.geom.Point2D's distance method to calculate the
distance between two ships in the game im writing. Well, the first
time I call the Point2D.distance method it returns NaN, then with
subsequent calls of the SAME valid arguments it returns a valid
number.
When I try and do a if(value == Double.NaN) on the NaN value it
doesent equate to true..... Well, Its either the Point2D.Distance()
returning NaN or the System.out.println is not printing out the value
properly and printing NaN instead.
Has anyone else encountered this problem? I use the static
Point2D.Distance method extensivly and it works 98% of the time, and
then returning NaN the other two.
Thanks, Greg.
Im having some really weird problems, Im using jdk1.4.1 and Im
using the java.awt.geom.Point2D's distance method to calculate the
distance between two ships in the game im writing. Well, the first
time I call the Point2D.distance method it returns NaN, then with
subsequent calls of the SAME valid arguments it returns a valid
number.
When I try and do a if(value == Double.NaN) on the NaN value it
doesent equate to true..... Well, Its either the Point2D.Distance()
returning NaN or the System.out.println is not printing out the value
properly and printing NaN instead.
Has anyone else encountered this problem? I use the static
Point2D.Distance method extensivly and it works 98% of the time, and
then returning NaN the other two.
Thanks, Greg.