Math.tan.js 440 B

12345678910111213141516
  1. try {
  2. assert(Math.tan(0) === 0);
  3. assert(Math.tan(null) === 0);
  4. assert(Math.tan('') === 0);
  5. assert(Math.tan([]) === 0);
  6. assert(Math.ceil(Math.tan(Math.PI / 4)) === 1);
  7. assert(isNaN(Math.tan()));
  8. assert(isNaN(Math.tan(undefined)));
  9. assert(isNaN(Math.tan([1, 2, 3])));
  10. assert(isNaN(Math.tan({})));
  11. assert(isNaN(Math.tan("foo")));
  12. console.log("PASS");
  13. } catch (e) {
  14. console.log("FAIL: " + e);
  15. }