mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:07:35 +00:00
LibJS: Add Math.{cos,sin,tan}()
This commit is contained in:
parent
04a36b247b
commit
f5dacfbb5b
5 changed files with 79 additions and 0 deletions
16
Libraries/LibJS/Tests/Math.tan.js
Normal file
16
Libraries/LibJS/Tests/Math.tan.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
try {
|
||||
assert(Math.tan(0) === 0);
|
||||
assert(Math.tan(null) === 0);
|
||||
assert(Math.tan('') === 0);
|
||||
assert(Math.tan([]) === 0);
|
||||
assert(Math.ceil(Math.tan(Math.PI / 4)) === 1);
|
||||
assert(isNaN(Math.tan()));
|
||||
assert(isNaN(Math.tan(undefined)));
|
||||
assert(isNaN(Math.tan([1, 2, 3])));
|
||||
assert(isNaN(Math.tan({})));
|
||||
assert(isNaN(Math.tan("foo")));
|
||||
|
||||
console.log("PASS");
|
||||
} catch (e) {
|
||||
console.log("FAIL: " + e);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue