Remove the numbers after a dot?

Get help using Construct 2

Post » Thu Feb 20, 2014 9:32 am

Hi all

i dont want to make this a long read for you :P

so basically lets say i have a value of 30

multiplied by 1.15

gives us the result of 34.5 which works extremly fine

but the point is i dont want that ".5" , i want it to be removed

any help ?
B
3
Posts: 1
Reputation: 175

Post » Thu Feb 20, 2014 9:35 am

You can use:

round()
ceil()
floor()

put the expression between the brackets.
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Feb 20, 2014 11:37 am

LittleStain wrote:You can use:

round()
ceil()
floor()

put the expression between the brackets.

OP,
round() is same as the thing you studied in Gr7 maths.
Ceil() rounds up.eg:ceil(5.1) would give 6.
floor() rounds down eg:floor(5.9) would give 5.
B
11
S
5
G
2
Posts: 496
Reputation: 2,306

Post » Thu Feb 20, 2014 11:53 am

int() does the job too.
B
7
S
2
Posts: 93
Reputation: 797


Return to How do I....?

Who is online

Users browsing this forum: dop2000, t redeemed t and 18 guests