{"ScriptPreparationCode":"var x = Math.random() * 1000;\r\nvar clientX = Math.random() * 1000;\r\nvar px = Math.random() * 1000;\r\nvar maxWidth = Math.random() * 1000;\r\nfunction MAX_INT(a, b) {\r\n return a - ((a - b) \u0026 ((a - b) \u003E\u003E 31));\r\n}\r\n\r\nfunction MIN_INT(a, b) {\r\n return a - ((a - b) \u0026 ((b - a) \u003E\u003E 31));\r\n}\r\nfunction MAX(a, b) {\r\n const intA = ~~a;\r\n const intB = ~~b;\r\n return intA - ((intA - intB) \u0026 ((intA - intB) \u003E\u003E 31));\r\n}\r\n\r\nfunction MIN(a, b) {\r\n const intA = ~~a;\r\n const intB = ~~b;\r\n return intA - ((intA - intB) \u0026 ((intB - intA) \u003E\u003E 31));\r\n}","TestCases":[{"Name":"Math.max/min","Code":"Math.min(Math.max(x \u002B clientX - px, 0), maxWidth) - x","IsDeferred":false},{"Name":"if","Code":"if(x \u002B clientX - px \u003C 0) return 0;\r\nif(x \u002B clientX - px \u003E 750) return maxWidth;\r\nreturn x \u002B clientX - px;","IsDeferred":false},{"Name":"ternary","Code":"return x \u002B clientX - px \u003C 0\r\n ? 0\r\n : (x \u002B clientX - px \u003E maxWidth\r\n ? maxWidth\r\n : x \u002B clientX - px) - x;","IsDeferred":false},{"Name":"bitwise","Code":"MIN_INT(MAX_INT(x \u002B clientX - px, 0), maxWidth)","IsDeferred":false},{"Name":"\u0026 ~~","Code":"MIN(MAX(x \u002B clientX - px, 0), maxWidth)","IsDeferred":false}]}