How do I create a non-decimal point percentage?

Get help using Construct 2

Post » Sat Nov 19, 2016 6:17 pm

I am working on a Statistics page and I need a nice clean looking percentage value.

I am able to get an exact percentage using the divide operator, but in the case of 30% of 100, I am looking for a non-decimal value of "33" not ".33333333333333...".
B
42
S
20
G
6
Posts: 106
Reputation: 6,567

Post » Sat Nov 19, 2016 6:31 pm

Lookup int(), round(), and ceil() in the manual.
Image ImageImage
B
172
S
50
G
183
Posts: 8,440
Reputation: 115,599

Post » Mon Nov 21, 2016 1:12 am

That worked perfectly. Thank you.

It ended up looking something like this:
text>append: ""&round(100*.3333333333)

Resulting in: 33

Multiplying *100 was needed to move the decimal over 2 places.
B
42
S
20
G
6
Posts: 106
Reputation: 6,567

Post » Mon Nov 21, 2016 3:53 am

Yep percentages are either multiplied,or divided, and 0.01 or 100.
Image ImageImage
B
172
S
50
G
183
Posts: 8,440
Reputation: 115,599


Return to How do I....?

Who is online

Users browsing this forum: RIDETHEPIG and 9 guests