I would like to find a function that will return this kind of formatted values :
1.5555 => 1.55
1.5556 => 1.56
1.5554 => 1.55
1.5651 => 1.56
toFixed() and math round return this value :
1.5651.fixedTo(2) => 1.57
This will be usefull for money rounding.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…