Very strange. As far as I know, Java has always done a simple truncation when casting a float or a double to an int, going back to the earliest definition of the language. It's never been the equivalent of a round or ceil operator. I'd be astonished if BeanShell or Groovy ever did anything else, either. In Javascript, of course, that's undefined.
|