summaryrefslogtreecommitdiffstats
path: root/src/utilities.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2014-07-11 23:36:17 +0200
committerwout <wout@impinc.co.uk>2014-07-11 23:36:17 +0200
commit462d2cd3738c904db0be7086878d1fcc17b79553 (patch)
treeafabf22b2f46e5432dc0d56219872f590eb19892 /src/utilities.js
parent7cc2d3635b8ed513e0f4e5be0a1823c1a6ad93dc (diff)
downloadsvg.js-462d2cd3738c904db0be7086878d1fcc17b79553.tar.gz
svg.js-462d2cd3738c904db0be7086878d1fcc17b79553.zip
Completely reworked transform system
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