Rounding a number to nearest 5 or 0

Mike Matthews - Omnis omnis at lineal.co.uk
Sun May 3 12:45:02 UTC 2026


Mod() is your friend.

Kind regards

Mike Matthews

> On 3 May 2026, at 13:24, Kelly Burgess via omnisdev-en <omnisdev-en at lists.omnis-dev.com> wrote:
>
> External sender <omnisdev-en at lists.omnis-dev.com>
>
> Make sure you trust this sender before taking any actions.
>
> Here's a round-to-nearest nickel calculation:  (amount is 2dp)
>
> Calculate amount as amount-mod(amount,0.05)+pick(mod(amount,0.05)>0.025,0,0.05)
>
> Kelly
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com/
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com


More information about the omnisdev-en mailing list