Math Problem With Percentages

Posted by TheDarkIn1978 on Stack Overflow See other posts from Stack Overflow or by TheDarkIn1978
Published on 2010-06-09T08:34:58Z Indexed on 2010/06/09 8:42 UTC
Read the original article Hit count: 204

Filed under:

i'm terrible at math. trust me, you math experts will see why after reading my question.

i have an object that is 300px in height. i need to calculate the percentage of that height where 90% = 300px (or the full height), 45% = 150px, 0% = 0px. so essentially, if i ask for 45% of the object's height, it will return 150px, or if i ask for 32% of the object's height, it will return __?

i believe this is really basic math, so i apologize in advance.

© Stack Overflow or respective owner

Related posts about math