I need it to always round up if its .5 IE 64.5 rounds to 65 65.5 round to 66 This is what I am using to try and get it to round but its rounding down on the 64.4 to 64 how can I get this to round up? Round(ProgressGetAvgsOfGrades.List.Current.ScoreAvg,fractionalDigits:)
Hi Dan,
To add to Kilian's answer, you also can use the Math Utils Reactive forge component which also has a Math_RoundAwayFromZero in a client action, instead of a server action.
Kind Regards,João
Yes, if they are creating a Reactive app, the Reactive version of the component is better of course.
I'd advise you to use the MathUtils Extension, it has the Math_RoundAwayFromZero Function that seems to do what you need.
Hi,
Other option (less elegant but effective ;-) ):
Round(If(x-Trunc(x)=0.5, x + 0.1, x))
Kind regards, David.
If you want to use Trunc, and provided it's all positive numbers, Trunc(value + 0.5) will also do the trick, but iirc Trunc has issues sometimes, which is why I recommended the Extension.