How can I check if Float or Double is infinite or NaN?
Java has an API for checking if a number is infinite or NaN .
I can't find anything like this in Scala, and for calling Java functions it looks like I need to set a value or call java.lang.Double static method:
Double.box(x).isNaN
java.lang.Double.isNaN(x)
Isn't there really anything native to Scala for checking for infinity / NaN-ness?
+3
source to share