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
39
S
18
G
5
Posts: 98
Reputation: 5,621

Post » Sat Nov 19, 2016 6:31 pm

Lookup int(), round(), and ceil() in the manual.
Image ImageImage
B
168
S
50
G
164
Posts: 8,227
Reputation: 105,573

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
39
S
18
G
5
Posts: 98
Reputation: 5,621

Post » Mon Nov 21, 2016 3:53 am

Yep percentages are either multiplied,or divided, and 0.01 or 100.
Image ImageImage
B
168
S
50
G
164
Posts: 8,227
Reputation: 105,573


Return to How do I....?

Who is online

Users browsing this forum: Cha0tiXGamer, MaujDeveloper and 8 guests