How do you test to see if a double is equal to NaN in Java? Use the static Double.isNaN(double) method, or your Double's .isNaN() method. Simply doing: if (var == Double.NaN) { ... } Reference: http://stackoverflow.com/questions/1456566/how-do-you-test-to-see-if-a-double-is-equal-to-nan-in-java Email ThisBlogThis!Share to XShare to Facebook
0 comments:
Post a Comment