Skip to content

Instantly share code, notes, and snippets.

@stuwilli
Created March 16, 2014 09:10
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stuwilli/9580481 to your computer and use it in GitHub Desktop.
Save stuwilli/9580481 to your computer and use it in GitHub Desktop.
How to Floor, Round, Ceiling in JSTL/EL
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))}
@StanislawVictorovich
Copy link

StanislawVictorovich commented Apr 13, 2020

This code doesn't works as for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment