From 8bca84f46e00d1d0d29ab0dc2406bef3b1248e17 Mon Sep 17 00:00:00 2001 From: Davide Tantillo Date: Fri, 17 May 2024 12:18:47 +0200 Subject: [PATCH] [ts] Used lambda for Color.toRgb888 --- spine-ts/spine-core/src/Utils.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/spine-ts/spine-core/src/Utils.ts b/spine-ts/spine-core/src/Utils.ts index 776fe06d0..43df6f430 100644 --- a/spine-ts/spine-core/src/Utils.ts +++ b/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)); }