{"ScriptPreparationCode":"// https://gamedev.stackexchange.com/a/116837\r\nfunction randIntA1(max, min = 0) {\r\n return Math.floor(Math.abs(Math.random() - Math.random()) * (1 \u002B max - min) \u002B min);\r\n}\r\nfunction randIntA2(max, min = 0) {\r\n return ~~(Math.abs(Math.random() - Math.random()) * (1 \u002B max - min) \u002B min);\r\n}\r\nfunction randIntB1(max, min = 0) {\r\n return Math.floor((1 \u002B max - min) * (1 - Math.sqrt(1 - Math.random()))) \u002B min;\r\n}\r\nfunction randIntB2(max, min = 0) {\r\n return ~~((1 \u002B max - min) * (1 - Math.sqrt(1 - Math.random()))) \u002B min;\r\n}","TestCases":[{"Name":"function A (regular)","Code":"randIntA1(10)","IsDeferred":false},{"Name":"function A (with Bitwise Double Not)","Code":"randIntA2(10)","IsDeferred":false},{"Name":"function B (regular)","Code":"randIntB1(10)","IsDeferred":false},{"Name":"function B (with Bitwise Double Not)","Code":"randIntB2(10)","IsDeferred":false}]}