{
  "code": "export class GameTool {\r\n    static getM_Vector(v1, v2) {\r\n        let temp = new Laya.Vector3();\r\n        Laya.Vector3.add(v1, v2, temp);\r\n        return new Laya.Vector3(temp.x * 0.5, temp.y * 0.5, temp.z * 0.5);\r\n    }\r\n    static SpliteString(s, sp) {\r\n        var _sp = sp ? sp : \";\";\r\n        let s_s = s.split(_sp);\r\n        let result = [];\r\n        for (let i = 0; i < s_s.length; i++) {\r\n            result.push(s_s[i]);\r\n        }\r\n        return result;\r\n    }\r\n    static random_1to1() {\r\n        var iszheng = Math.random() > 0.5 ? -1 : 1;\r\n        return Math.random() * iszheng;\r\n    }\r\n    static get64Encode(str) {\r\n        var c1, c2, c3;\r\n        var base64EncodeChars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\r\n        var i = 0, len = str.length, string = '';\r\n        while (i < len) {\r\n            c1 = str.charCodeAt(i++) & 0xff;\r\n            if (i == len) {\r\n                string += base64EncodeChars.charAt(c1 >> 2);\r\n                string += base64EncodeChars.charAt((c1 & 0x3) << 4);\r\n                string += \"==\";\r\n                break;\r\n            }\r\n            c2 = str.charCodeAt(i++);\r\n            if (i == len) {\r\n                string += base64EncodeChars.charAt(c1 >> 2);\r\n                string += base64EncodeChars.charAt(((c1 & 0x3) << 4) | ((c2 & 0xF0) >> 4));\r\n                string += base64EncodeChars.charAt((c2 & 0xF) << 2);\r\n                string += \"=\";\r\n                break;\r\n            }\r\n            c3 = str.charCodeAt(i++);\r\n            string += base64EncodeChars.charAt(c1 >> 2);\r\n            string += base64EncodeChars.charAt(((c1 & 0x3) << 4) | ((c2 & 0xF0) >> 4));\r\n            string += base64EncodeChars.charAt(((c2 & 0xF) << 2) | ((c3 & 0xC0) >> 6));\r\n            string += base64EncodeChars.charAt(c3 & 0x3F);\r\n        }\r\n        return string;\r\n    }\r\n    static randomInt(min, max) {\r\n        if (max < min)\r\n            return parseInt(min);\r\n        return parseInt(Math.random() * (max - min + 1) + min);\r\n    }\r\n}\r\n//# sourceMappingURL=GameTool.js.map",
  "references": [],
  "map": "{\"version\":3,\"file\":\"GameTool.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../src/Util/GameTool.ts\"],\"names\":[],\"mappings\":\"AAGA,MAAM,OAAQ,QAAQ;IAIX,MAAM,CAAC,WAAW,CAAC,EAAgB,EAAE,EAAgB;QACxD,IAAI,IAAI,GAAG,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;QAC9B,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;QAC/B,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;IACtE,CAAC;IAEM,MAAM,CAAC,YAAY,CAAC,CAAS,EAAE,EAAG;QACrC,IAAI,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAA;QACvB,IAAI,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QACtB,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACjC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;SACvB;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;IAEM,MAAM,CAAC,WAAW;QACrB,IAAI,OAAO,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3C,OAAO,IAAI,CAAC,MAAM,EAAE,GAAG,OAAO,CAAC;IACnC,CAAC;IAEM,MAAM,CAAC,WAAW,CAAC,GAAG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