HackerTrans
TopNewTrendsCommentsPastAskShowJobs

Valter42

no profile record

comments

Valter42
·4 ปีที่แล้ว·discuss
This toFixed is if the precision is below 16, JS just doesn't work with more, you literally can't have more than 16 digits after the decimal, JS will round it (very poorly btw)

BTW if one needs to round to more than 16 you can use toLocaleString and pass minimum and maximum fraction digits which has a limit of 20. Ain't much but you could not expect more from JS :D