This week's book giveaway is in the Other Open Source APIs forum. We're giving away four copies of Storm Applied and have Sean Allen, Peter Pathirana & Matthew Jankowski on-line! See this thread for details.
When you cast Float.POSITIVE_INFINITY down to int it will be masked to Integer.MAX_VALUE. And Float.NEGATIVE_INFINITY will be masked to Integer.MIN_VALUE. And Float.NaN will be masked to 0. This also works for Double and Long.