Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
17 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,11 @@ coverage/ | |
node_modules/ | ||
npm-debug.log | ||
|
||
# | ||
# Ide folders. | ||
# | ||
.idea/ | ||
|
||
# | ||
# OS X. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,9 @@ | ||
/** | ||
* Module dependencies. | ||
*/ | ||
module.exports = function (degrees) { | ||
"use strict"; | ||
|
||
var assert = require('assert'); | ||
if (typeof degrees !== 'number') { | ||
throw new TypeError('Degrees should be a number'); | ||
} | ||
|
||
/** | ||
* Convert degrees to radians. | ||
* | ||
* @param {Number} degrees | ||
* @return {Number} | ||
*/ | ||
|
||
module.exports = function(degrees) { | ||
assert('number' == typeof degrees, 'Degrees should be a number'); | ||
return degrees * (Math.PI / 180); | ||
} | ||
return degrees * (Math.PI / 180); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters