Browse Source

Color.getHex() de-obfuscated.
Is not used so much anymore so we can have it with a less obfuscating syntax.

Mr.doob 13 years ago
parent
commit
8749fe04db
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/core/Color.js

+ 1 - 1
src/core/Color.js

@@ -106,7 +106,7 @@ THREE.Color.prototype = {
 
 	getHex: function () {
 
-		return ~~ ( this.r * 255 ) << 16 ^ ~~ ( this.g * 255 ) << 8 ^ ~~ ( this.b * 255 );
+		return Math.floor( this.r * 255 ) << 16 ^ Math.floor( this.g * 255 ) << 8 ^ Math.floor( this.b * 255 );
 
 	},