How can i round decimals?

  • 22 November 2019
  • 2 replies
  • 9 views

This question might be silly, but is there a command to round decimals?

Example: 

i have a periodic 1,66666... and i just want 1.67

The number must be with 2 decimals and rounded up to nearest (.5 rounds up)


2 replies

I don't think there's a built in command, but you could always use a very simple Python script!

 

 

This will do what you're looking for I think. Here's a guide on how to use Python's round: https://www.w3schools.com/python/ref_func_round.asp

Oh nice, ill try using a script like that next time... I tried with jscript and failed, and ended up doing this workaround

Reply