` Swedish rounding (Jorg Fakler ) - Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Icetips Article

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: Swedish rounding
2005-03-24 -- Jorg Fakler
 
> A fun fact about New Zealand: The monetary system revolves around Swedish > rounding. Back around 6 years ago when the switch to plastic money happened, > New Zealand got rid of the penny and instituted a crazy rounding scheme. > Here's how it goes: middle numbers (3, 4, 5, 6, and 7) all round to 5, and > end numbers (8, 9, 0, 1, and 2) round to 0. So something that's 3.97 rounds > to 3.95. Got it? Good, you're on your way to becoming Kiwi. decimalAmount *= 100 decimalAmount += 2.5 longAmount = decimalAmount / 5 decimalAmount = longAmount / 20


Today is November 21, 2024, 3:59 am
This article has been viewed 35229 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: