Fix

Top  Previous  Next

fix(value, dp)

 

Fixes the value to the indicated number of decimal places, padding with zeros if required. If the number of decimal places is negative, the number is rounded to the nearest whole number and padded with zeros to the left of the decimal point.

 

fix(134.4034,2) = 134.40

fix(134.4,5) = 134.40000

fix(12.34,-5) = 00012