Skip to content

Commit

Permalink
feat: add math/base/special/cosd
Browse files Browse the repository at this point in the history
  • Loading branch information
the-r3aper7 committed Mar 9, 2024
1 parent b3ec0e3 commit 9c9e2e4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/node_modules/@stdlib/math/base/special/cosd/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ var isInteger = require( '@stdlib/math/base/assert/is-integer' );
function cosd( x ) {
var xRad;

if (isInteger(((x / 90) + 1) / 2) || Infinity < x || -Infinity > x) {
if (x === Infinity || x === -Infinity) {
return NaN;
}

if (isInteger(((x / 90) - 1) / 2)) {
return 0;
}

Expand Down

0 comments on commit 9c9e2e4

Please sign in to comment.