Permalink
Browse files

use parseInt

  • Loading branch information...
1 parent 1d6cfd9 commit 2d94fd518edab74cafd5bcdba5a8e4d513db826e @youpy committed Nov 22, 2011
Showing with 1 addition and 2 deletions.
  1. +1 −2 Contents/Resources/js/jsfxgui.js
@@ -158,8 +158,7 @@ var jsfxgui = {};
// added
this.char2value = function(c, range) {
- var chars = '0123456789abcdef'.split('');
- return range * (chars.indexOf(c) / chars.length);
+ return range * (parseInt(c, 16) / 16);
};
this.setFromMd5 = function(md5){
var len = Parameters.length;

0 comments on commit 2d94fd5

Please sign in to comment.