Module numberutil

Various functions for working with numbers.

Functions

format (number, decimal_places, decimal_separator, thousand_separator) Formats the given number into a nice, readable string.


Functions

format (number, decimal_places, decimal_separator, thousand_separator)
Formats the given number into a nice, readable string.

Parameters:

  • number The number to format.
  • decimal_places Optional. How many decimal places to show. The number will be rounded to this amount of decimal places, if omitted, as many as there are are printed.
  • decimal_separator Optional. The decimal separator to use, defaults to a dot.
  • thousand_separator Optional. The thousand separator to use, defaults to a comma.

Returns:

    The formatted number.
generated by LDoc 1.4.2