%

Game Editor comments and discussion.

%

Postby BogdansB » Mon Jan 02, 2012 11:24 am

how can i make percents?

variable a - 35% of variable b , for example
BogdansB
 
Posts: 94
Joined: Tue Oct 25, 2011 2:30 pm
Score: 0 Give a positive score

Re: %

Postby phyzix5761 » Mon Jan 02, 2012 1:01 pm

Percent is nothing more than multiplying by the decimal of whatever percentage you want. 35% of 100 is 35. In order to get that you do 100 * .35.

So if you want 63% of a you do b = a * .63.
phyzix5761
 
Posts: 261
Joined: Sun Feb 27, 2011 4:28 am
Score: 18 Give a positive score

Re: %

Postby schnellboot » Mon Jan 02, 2012 2:28 pm

BogdansB wrote:variable a - 35% of variable b

Code: Select all
a -= b * 0.35
schnellboot
 
Posts: 819
Joined: Sat Mar 31, 2007 1:35 pm
Location: Germany
Score: 102 Give a positive score

Re: %

Postby BogdansB » Mon Jan 02, 2012 8:42 pm

ok thanks :D
BogdansB
 
Posts: 94
Joined: Tue Oct 25, 2011 2:30 pm
Score: 0 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest