summaryrefslogtreecommitdiffstats
path: root/src/utilities.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/utilities.js')
-rw-r--r--src/utilities.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/utilities.js b/src/utilities.js
index 4770f9b..0c1a0a3 100644
--- a/src/utilities.js
+++ b/src/utilities.js
@@ -11,4 +11,13 @@ SVG.utils = {
return result
}
+ // Degrees to radians
+, radians: function(d) {
+ return d % 360 * Math.PI / 180
+ }
+ // Radians to degrees
+, degrees: function(r) {
+ return r * 180 / Math.PI % 360
+ }
+
} \ No newline at end of file