# Too precise numbers?

Get help using Construct 2

### » Sun Sep 01, 2013 9:50 pm

Picture says it all.

Anyway to make it display the numbers without the decimals?
B
3
Posts: 8
Reputation: 216

### » Sun Sep 01, 2013 10:03 pm

round(number) to round to nearest integer
or
ceil(number) to round it up
floor(number) to round it down
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,850

### » Mon Sep 02, 2013 12:16 am

well, ramones said it all

cool addition: use "Zeropad" to add zeros in front of your number so it's always the same number of digits like speed "002" insted of just "2".

it would go like this: zeropad(speed,3) <--- this would take the variable speed and display it with 3 digits.
B
43
S
12
G
6
Posts: 446
Reputation: 6,807

### » Mon Sep 02, 2013 12:40 am

[QUOTE=Sargas] well, ramones said it all

cool addition: use "Zeropad" to add zeros in front of your number so it's always the same number of digits like speed "002" insted of just "2".

it would go like this: zeropad(speed,3) <--- this would take the variable speed and display it with 3 digits. [/QUOTE]

Ahh I didn't know that, Will save me some time tweaking my item numbers in the UI.

Cheers
B
10
S
2
G
1
Posts: 77
Reputation: 1,278

### » Mon Sep 02, 2013 1:58 am

Im so new to this. Where to add the round(number) part exactly?
B
3
Posts: 8
Reputation: 216

### » Mon Sep 02, 2013 2:16 am

where you would normally place the value

on the "set text as", you'd normally just input the value, instead input "round(value)" or "zeropad(round(value),3) for a zeropaded rounded value :D
B
43
S
12
G
6
Posts: 446
Reputation: 6,807