You need to sign in to do that
Don't have an account?
Irvine Delacroix
Need help with Calculation round up to nearest 15.
Hello,
I need help on some calculation for my trigger.
Basically, what I would like to do is to get value like if the Result is 16, then this will round to 30, if it's 24 then it will still be 30, if the value is 32 then it will be 45.
What I did was :
integer x = 32;
double y = doubleValueOf(x - math.mod(x)) + 15;
But this doesn't seem to be consistent. Can I have some other sure approach to achieve this?
Thanks
this could be done in a simple math manipulation
y = x + 14 - (math.mod(x + 14,15));