Default to Float type for division of Int's
A division of 2 integers should not yield an integer by default. It would be better to return a float value by default, except when the targeted variable (lhs/param) is known to be integer.
So I don’t need to cast to float explicitly:Submitted by Elmer van Chastelet on 13 April 2011 at 17:32
(query.resultSize().floatValue() / resultsPerPage.floatValue()).ceil()
Log in to post comments