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))} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
This code doesn't works as for me