Skip to content

str::precision ​

precision(number: Float, precision: Integer) ​

ParameterTypeDescription
numberFloatThe floating point number to round.
precisionIntegerHow many decimal places the string representation should show.

Returns ​

(String) A string representation of the given number rounded by the given precision.