Selaa lähdekoodia

[ts] Used lambda for Color.toRgb888

Davide Tantillo 1 vuosi sitten
vanhempi
commit
8bca84f46e
1 muutettua tiedostoa jossa 1 lisäystä ja 3 poistoa
  1. 1 3
      spine-ts/spine-core/src/Utils.ts

+ 1 - 3
spine-ts/spine-core/src/Utils.ts

@@ -172,9 +172,7 @@ export class Color {
 	}
 
 	toRgb888 () {
-		function hex(x: number) {
-			return ("0" + (x * 255).toString(16)).slice(-2);
-		}
+		const hex = (x: number) => ("0" + (x * 255).toString(16)).slice(-2);
 		return Number("0x" + hex(this.r) + hex(this.g) + hex(this.b));
 	}