Last active
April 29, 2018 01:41
-
-
Save erinxocon/f3d4670c036442e558e7fc34cf495d08 to your computer and use it in GitHub Desktop.
Revisions
-
erinxocon revised this gist
Apr 29, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ interface Math { toRadians(degrees: number): number; toDegrees(radians: number): number; } -
erinxocon created this gist
Apr 29, 2018 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ declare interface Math { toRadians(degrees: number): number; toDegrees(radians: number): number; } // Converts from degrees to radians. Math.radians = (degrees: number): number => { return degrees * Math.PI / 180; }; // Converts from radians to degrees. Math.degrees = (radians: number): number => { return radians * 180 / Math.PI; };