Exponential easing

This simple easing function takes an arbitrary power as a second argument, allowing for exponential easing to any power

const easeInOut = (t, p = 5) =>
  t <= 0.5
    ? Math.pow(t * 2, p) / 2
    : 1 - Math.pow(2 - t * 2, p) / 2

Rather than separate declarations for cubicInOut, quartInOut and quintInOut easing functions, this method allows for easing to any power by passing a second argument p. t is assumed to be normalised between 0 and 1. Values of p below 1 result in inverse easing, where the object enters at full speed, slows down and then accelerates out.

p = p = 0.1
p = p = 0.2
p = p = 0.3
p = p = 0.4
p = p = 0.5
p = p = 0.6
p = p = 0.7
p = p = 0.8
p = p = 0.9
p = p = 1
p = p = 1.5
p = p = 2
p = p = 3
p = p = 4
p = p = 5
p = p = 6
p = p = 7
p = p = 8
p = p = 9
p = p = 10