Skip to content

Hide decimals when decimals are zeros #569

Discussion options

You must be logged in to vote

value={Math.round((11.9991321 + Number.EPSILON) * 1000) / 1000} formats to 11,999

value={Math.round((11 + Number.EPSILON) * 1000) / 1000} formats to 11

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by FilipBrannlund
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant