This should be easy, but for some reason I keep approaching it wrong.
I need to incrementally increase a base number, on a one to infinity scale.
I have a number representing in milliseconds the duration of an animation, starting at 750. I have another number, representing the number of elements we are skipping.
var animationDuration = 750;
var difference = Math.abs(currentPanelIndex - target); //somewhere from 1 - X
I need to increase animationDuration incrementally for each number in difference.
currentPanelIndexandtarget?animationDuration,currentPanelIndexandtargetrelated? (That's probably the core of your question, but they're too unobvious for me to understand so far.)