asinz.js 108 B

123456
  1. export default function(x) {
  2. if (Math.abs(x) > 1) {
  3. x = (x > 1) ? 1 : -1;
  4. }
  5. return Math.asin(x);
  6. }