message: feat: replaced the Math.sign polyfill function with a function suggested by Mozilla
diff: @@ -77,12 +77,15 @@ export function calculateAllKinematics<T extends number[]>(movement: T, delta: T
  }
  }
  +/**
  + * Because IE doesn't support `Math.sign` function, so we use the polyfill version of the function.
  + * This polyfill function came from
  + * :https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sign#Polyfill
  + * @param x target number
  + */
  export function sign(x: number) {
  - let num = Number(x)
  - if (num === 0 || isNaN(num)) {
  - return num
  - }
  - return num > 0 ? 1 : -1
  + if (Math.sign) return Math.sign(x)
  + return Number(x > 0) - Number(x < 0) || +x
  }
  export function getIntentionalDisplacement(movement: number, threshold: number): number | false {
  