{
  "code": "export class MathHelper {\r\n    static Clamp(n, min, max) {\r\n        return n > max ? max : (n < min ? min : n);\r\n    }\r\n    static ClampRange(n, a, b, min, max) {\r\n        return (MathHelper.Clamp(n, a, b) - a) / (b - a) * (max - min) + min;\r\n    }\r\n    static ToPercentage(n, min, max) {\r\n        return (n - min) / (max - min);\r\n    }\r\n    static ToRad() {\r\n        return Math.PI / 180;\r\n    }\r\n    static ToDeg() {\r\n        return 180 / Math.PI;\r\n    }\r\n    static Rand(min, max) {\r\n        return Math.random() * (max - min) + min;\r\n    }\r\n    static RandInt(min, max) {\r\n        return Math.floor(Math.random() * (max - min + 1) + min);\r\n    }\r\n    static Lerp(a, b, t) {\r\n        return a * (1 - t) + b * t;\r\n    }\r\n    static PrefixNum(num, len, prefix = \"0\") {\r\n        return (Array(len).join(prefix) + num).slice(-len);\r\n    }\r\n    static ClampEuler(angle) {\r\n        while (angle > 180) {\r\n            angle -= 360;\r\n        }\r\n        while (angle < -180) {\r\n            angle += 360;\r\n        }\r\n        return angle;\r\n    }\r\n}\r\n//# sourceMappingURL=MathHelper.js.map",
  "references": [],
  "map": "{\"version\":3,\"file\":\"MathHelper.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../src/GameUtils/MathHelper.ts\"],\"names\":[],\"mappings\":\"AAAA,MAAM,OAAO,UAAU;IAEZ,MAAM,CAAC,KAAK,CAAC,CAAS,EAAE,GAAW,EAAE,GAAW;QACnD,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/C,CAAC;IAGM,MAAM,CAAC,UAAU,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS,EAAE,GAAW,EAAE,GAAW;QAC9E,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC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