Discuss Scratch

DogAteMyNickname
Scratcher
4 posts

How to round float numbers?

For example I have 3.12345
And I want to round it to 3.12?
Is there any way to do it?
Za-Chary
Scratcher
1000+ posts

How to round float numbers?

How about this?

round3.12345*100/100 returns '3.12'
DogAteMyNickname
Scratcher
4 posts

How to round float numbers?

Za-Chary wrote:

How about this?

round3.12345*100/100 returns '3.12'
Thank you very much!

Powered by DjangoBB