# How to simplify the following basic equation

I just wanna know if you can find a way to simplify this following equation :

originalState + ( ( animatedState * ( 100 - ( finishPos - x ) * 100 / (finishPos - startPos) ) / 100 )

Thanks

-
You have more open parenthesis than closing parenthesis. – axblount Aug 14 '12 at 13:54
A nit: equations have equal signs. This is an expression. – Ross Millikan Aug 14 '12 at 14:02
Do you mean, $\text{originalState} + \Big(\frac{\text{animatedState} \big(100 - 100( \text{finishPos} - x )\big) }{ 100(\text{finishPos} - \text{startPos})}\Big)$ – dashdart Aug 14 '12 at 14:29

Being lazy, I'll replace each variable by its first letter, and I get this (with its unbalanced parens):

$o + ( ( a * ( 100 - ( f - x ) * 100 / (f - s) ) / 100 )$.

The "100"s seems to cancel out, and. balancing the parens, I get

$o + a * ( 1 - \frac{ f - x}{f - s} )$.

Simplifying the expression inside the parens I get this:

$o + a * ( \frac{ x-s}{f - s} )$.

-
thanks dude :) ! – socrateisabot Aug 14 '12 at 17:08

The only thing I can see is to work inside the brackets, to get the two finishPos pieces together. $100-\frac {100(\text{finishPos-x})}{\text{finishPos-startPos}}=100\frac {\text{finishPos-startPos}}{\text{finishPos-startPos}}-\frac {100(\text{finishPos-x})}{\text{finishPos-startPos}}=\frac {100(\text{x-startPos})}{\text{finishPos-startPos}}$ then the last division by $100$ takes the $100$ out of the numerator, giving $\text{originalState+animatedState}\times \frac {\text{x-startPos}}{\text{finishPos-startPos}}$ which seems to show the intent.

-
thanks as well mate – socrateisabot Aug 14 '12 at 17:07