# Math help needed!

Show 40 post(s) from this thread on one page
Page 1 of 2 12 Last
• 12-11-2008, 03:18 PM
Sonicxtacy02
Math help needed!
I'm using this formula in some code i'm writing to get the percent of a number

Percent = ((( X ) / 272) * 100)-10)

This formula works. But i need a second formula that solves for x using the same constants... and adding a percent as a constant

so lets say for example percent = 50.. how would i figure out what the heck x is lol.

I knew i shouldnt have copied from the smart chick in math class:peep:
• 12-11-2008, 03:25 PM
JackB
I'm not exactly sure why you're offsetting the percentage by 10...

Usually this is the formula:

% = ( X / TotalItems) * 100

If we solve for X, we get:

X = (% * TotalItems) / 100

X = (Percent + 10) * 272 / 100

Is that what you're looking for?
• 12-11-2008, 03:28 PM
Sonicxtacy02
Quote:

Originally Posted by JackB
I'm not exactly sure why you're offsetting the percentage by 10...

Usually this is the formula:

% = ( X / TotalItems) * 100

If we solve for X, we get:

X = (% * TotalItems) / 100

X = (Percent + 10) * 272 / 100

Is that what you're looking for?

i'm offsetting because the slider is offset by 10. I'll try the formula and let you know the results
• 12-11-2008, 03:28 PM
Maheriano
Math homework?

Just change the signs as you bring the numbers across the equals sign.
Percent = ((( X ) / 272) * 100)-10)
Percent + 10 = ((x) / 272) * 100)
Percent + 10 = 100x / 272
272 * (Percent + 10) = 100x
272/100 * (Percent + 10) = x
2.72 * (Percent + 10) = x
• 12-11-2008, 03:41 PM
Sonicxtacy02
Quote:

Originally Posted by Maheriano
Math homework?

Just change the signs as you bring the numbers across the equals sign.
Percent = ((( X ) / 272) * 100)-10)
Percent + 10 = ((x) / 272) * 100)
Percent + 10 = 100x / 272
272 * (Percent + 10) = 100x
272/100 * (Percent + 10) = x
2.72 * (Percent + 10) = x

Nah not homework.. skin work..and it works! Thanks guys.. had been rattling my brain on that for some time.
• 12-11-2008, 03:42 PM
JackB
Yeah, Maheriano... That's what I said, (basically). :)

The 272/100 will be compiled out. ;)

I enjoy math. Does that make me sick? :)
• 12-11-2008, 05:26 PM
Quote:

Originally Posted by JackB
Yeah, Maheriano... That's what I said, (basically). :)

The 272/100 will be compiled out. ;)

I enjoy math. Does that make me sick? :)

A sadist maybe. I don't know, I do math all day long at work.
• 12-11-2008, 05:32 PM
Maheriano
Quote:

Originally Posted by JackB
Yeah, Maheriano... That's what I said, (basically). :)

The 272/100 will be compiled out. ;)

I enjoy math. Does that make me sick? :)

Great minds think alike! I did it out for him though, so hopefully he'll understand how it works for next time.
• 12-11-2008, 06:13 PM
Sonicxtacy02
probably not but at least ill know where to search :)
• 12-11-2008, 06:18 PM
JackB
Quote: