The $1.0e6 question!
I could never figure this out on my own.
I cannot believe I missed the Integer class. :o
I’m silly. :
I was using these 2:
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Math.html#signum(double)
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Math.html#signum(float)
Thanks.
Odd that the method wasn’t included for bytes, shorts and ints too, just for completeness.
Cas
You grab your mallet, I’ll grab my armour and we’ll meet the Sun engineers responsible.
Or you could just submit a patch to Java 7
that signum in Integer isn’t that old either…