(solved) About rounding numbers

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
Doeny
Regular
Posts: 26
Joined: Wed Sep 07, 2022 8:28 pm
Contact:

(solved) About rounding numbers

#1 Post by Doeny » Mon Sep 19, 2022 12:28 am

Hi, I need help with rounding numbers to hundredth part/2nd space after comma. Can i do it in a simple way or do I have to write an individual code for that?
Last edited by Doeny on Mon Sep 19, 2022 2:34 am, edited 1 time in total.

User avatar
laure44
Regular
Posts: 60
Joined: Mon Mar 08, 2021 10:55 pm
Projects: Arkan'sTower, Gemshine Lorelei!
Location: France
Contact:

Re: About rounding numbers

#2 Post by laure44 » Mon Sep 19, 2022 1:05 am

Doeny wrote:
Mon Sep 19, 2022 12:28 am
Hi, I need help with rounding numbers to hundredth part/2nd space after comma. Can i do it in a simple way or do I have to write an individual code for that?

Code: Select all

round(num,2)

Doeny
Regular
Posts: 26
Joined: Wed Sep 07, 2022 8:28 pm
Contact:

Re: About rounding numbers

#3 Post by Doeny » Mon Sep 19, 2022 2:18 am

laure44 wrote:
Mon Sep 19, 2022 1:05 am
Doeny wrote:
Mon Sep 19, 2022 12:28 am
Hi, I need help with rounding numbers to hundredth part/2nd space after comma. Can i do it in a simple way or do I have to write an individual code for that?

Code: Select all

round(num,2)
Thx, I got it

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Majestic-12 [Bot]