Skip to content

Commit

Permalink
toRadian now uses parseInt, so float values can be used. Fixes #2, th…
Browse files Browse the repository at this point in the history
…anks @louisremi
  • Loading branch information
pbakaus committed Jun 14, 2012
1 parent 3efe794 commit 94f0ab0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions transformie.js
Expand Up @@ -9,11 +9,11 @@ var Transformie = {

toRadian: function(value) {
if(value.indexOf("deg") != -1) {
return parseInt(value,10) * (Math.PI * 2 / 360);
return parseFloat(value,10) * (Math.PI * 2 / 360);
} else if (value.indexOf("grad") != -1) {
return parseInt(value,10) * (Math.PI/200);
return parseFloat(value,10) * (Math.PI/200);
} else {
return parseInt(value,10);
return parseFloat(value,10);
}
},

Expand Down

0 comments on commit 94f0ab0

Please sign in to comment.