I am doing table pagination logic for my project using Thymeleaf.
I have two values:
- int totalRows
- int rowsPerPage
The operation I want to do is something along the lines of Math.ceil((1.0 + totalRows) / rowsPerPage) to store in a variable that represents the total number of pages necessary.
However, I'm not sure how to do that ceil() operation to convert it from a decimal to an integer.