You need to sign in to do that
Don't have an account?

bug of decimal round up?
I'm using Decimal round up, but it seems it always give me the round-down integer but not the up-integer.
pageSize = 10;
The excepted totalpages should be 6, but it returns 5..
Any wrong with my code?
Thanks
Decimal pages = this.processedNum/pageSize; this.totalpages = (Integer)pages.round(System.RoundingMode.CEILING);processedNum = 56;
pageSize = 10;
The excepted totalpages should be 6, but it returns 5..
Any wrong with my code?
Thanks
Decimal pages = Decimal.valueOf(this.processedNum) / pageSize