tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Buckley" <briankbuck...@attbi.com>
Subject Re: Re: Re: Rif: Re: float to int conversion using EL; also how we can use ceil(), floor(), ...
Date Fri, 23 May 2003 12:24:54 GMT
Try it.  <c:set var="result" value="${x + .5 - ((x + .5) % 1)}" />  rounds
up as Math.ceil() does.  Values greater than 3.0 round to 4.

Brian

> In my opinion, what you have presented is exactly the Math.round()
> behaviour (so round to 3 for 3.4 and round to 4 for 3.6)
> ...not the Math.ceil()... which rounds to 4 for all the values greater
> than 3.0.  :)



---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message