Created
March 16, 2014 09:10
-
-
Save stuwilli/9580481 to your computer and use it in GitHub Desktop.
How to Floor, Round, Ceiling in JSTL/EL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Floor(N) -> ${N-(N%1)} | |
Ceiling(N) -> ${N+(1-(N%1))%1} | |
Round(N) -> ${N+((N%1>0.5)?(1-(N%1))%1:-(N%1))} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This code doesn't works as for me