Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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))}

This comment has been minimized.

Copy link

@StanislawVictorovich 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