UNPKG
@dulysse1/better-node
Version:
latest (2.2.14)
2.2.14
2.2.13
2.2.12
2.2.11
2.2.10
2.2.9
2.2.8
2.2.7
2.2.6
2.2.5
2.2.4
2.2.3
2.2.2
2.2.1
2.2.0
2.1.11
2.1.10
2.1.9
2.1.8
2.1.7
2.1.6
2.1.5
2.1.4
2.1.3
2.1.2
2.1.1
2.1.0
2.0.0
1.2.22
1.2.21
1.2.20
1.2.19
1.2.18
1.2.17
1.2.16
1.2.15
1.2.14
1.2.13
1.2.12
1.2.11
1.2.10
1.2.9
1.2.8
1.2.7
1.2.6
1.2.5
1.2.4
1.2.3
1.2.2
1.2.1
1.2.0
1.1.2
1.1.1
1.1.0
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
Improve Node types & add object properties
github.com/Dulysse/better-node
@dulysse1/better-node
/
lib
/
math
/
radian.js
14 lines
(13 loc)
•
280 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
try
{
Object
.
defineProperty
(
global
.
Math
,
"radians"
, {
value
:
function
(
deg
) {
if
(
typeof
deg !==
"number"
) {
throw
new
Error
(
"TypeError: deg value should be a number."
); }
return
(deg *
this
.
PI
) /
180.0
; }, }); }
catch
(error) {
void
0
; }
module
.
exports
= {};