User:QuickNick/FormatNumDP2

Script to nicely format and round numbers to N decimal places.

Note: This is functionally the same as User:QuickNick/FormatNumDP but it doesn’t have all the testing output SO it can be used!

Syntax:

DP is Number of Decimal Places and if not set it will default to 0.

This is the relevant part of the script with carriage-returns to make it easier to read!

Some examples ...

100kph = mph 100kph = mph is the same as is the same as