Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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

share|improve this question
3  
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)$ –  Bidit Acharya Aug 14 '12 at 14:29
add comment

2 Answers

up vote 1 down vote accepted

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} )$.

share|improve this answer
    
thanks dude :) ! –  socrateisabot Aug 14 '12 at 17:08
add comment

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.

share|improve this answer
    
thanks as well mate –  socrateisabot Aug 14 '12 at 17:07
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.