This function finds the next lowest "round" number, based on whatever factor of ten the original number is based. For instance, 11 becomes 10; 200 becomes 100; 0.4 becomes 0.3; and -120 becomes -200. (In this function, a "round" number is regarded as an integer multiplied by some power of ten.)

This function might be useful for determining a chart's minimum scale (as in xmCHART): for example, if the minimum data point is -428, this function returns -500 as an appropriate chart minimum. It bumps already round numbers down (200 goes to 100), on the principle that a chart's data point should never lie directly on the minimum (An exception is made for zero.)

Comments

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for
15 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: