Rounding a number to nearest 5 or 0

Andy Hilton andyh at totallybrilliant.com
Sun May 3 12:47:05 UTC 2026


Mike

Int is for me a better friend than mod :)

Andy Hilton
Totally Brilliant Software Inc
Phone (US) : (863) 409 4870 
Web : www.totallybrilliant.com 
Helpdesk : https://totallybrilliantsoftware.supportsystem.com/
Email : andyh at totallybrilliant.com

> On May 3, 2026, at 8:45 AM, Mike Matthews - Omnis via omnisdev-en <omnisdev-en at lists.omnis-dev.com> wrote:
> 
> 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
> _____________________________________________________________
> 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