Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.

Join them; it only takes a minute:

Sign up
Join the Stack Overflow community to:
  1. Ask programming questions
  2. Answer and help your peers
  3. Get recognized for your expertise

Ok, this is one for math people, I guess. I have some basic knowledge of ease functions but need some helping hand with this.

I have an element that is translated with CSS transition (translateX) using ‘easeOutSine’ function.

It covers distance A in 1500 ms. I need to find out how much time it needs to cover a distance B (somewhere in between)

The function for ‘easeOutSine’ is:

function easeOutSine(t, b, c, d) {
    return c * Math.sin(t/d * (Math.PI/2)) + b;
}

Obviously A and B are known values for me. But I need to know where to put them in the arguments or how to handle this at all. Thanks very much in advance!

share

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.