{"ScriptPreparationCode":"var width = 480;\r\nvar halfWidth = width \u003E\u003E 1;\r\nvar invertedHalfWidth = 1 / halfWidth;","TestCases":[{"Name":"Conditional comparison","Code":"var xPos = Math.random() * width;\r\nvar xQuadLeft = xPos \u003C halfWidth ? 0 : 1;","IsDeferred":false},{"Name":"Bitwise comparison","Code":"var xPos = Math.random() * width;\r\nvar diff = xPos ^ halfWidth;\r\ndiff |= diff \u003E\u003E 1;\r\ndiff |= diff \u003E\u003E 2;\r\ndiff |= diff \u003E\u003E 4;\r\ndiff |= diff \u003E\u003E 8;\r\ndiff |= diff \u003E\u003E 16;\r\ndiff \u0026= ~(diff \u003E\u003E 1) | 0x80000000;\r\ndiff \u0026= (xPos ^ 0x80000000) \u0026 (halfWidth ^ 0x7fffffff);\r\nvar xQuad = !!diff;","IsDeferred":false},{"Name":"Other test","Code":"var xPos = Math.random() * width;\r\nvar xQuad = xPos ^ halfWidth \u0026\u0026 (\r\n !(halfWidth ^ 0) ||\r\n ( (xPos / halfWidth) | 0 )\r\n );","IsDeferred":false},{"Name":"Other test 2","Code":"var xPos = Math.random() * width;\r\nvar xQuad = xPos == width ? 1 : ( ( xPos * invertedHalfWidth ) | 0 );","IsDeferred":false},{"Name":"Other test 3","Code":"var xPos = Math.random() * width;\r\nvar xQuad = xPos == width ? 1 : ~~( xPos * invertedHalfWidth );","IsDeferred":false},{"Name":"Other test 4","Code":"var xPos = Math.random() * width;\r\nvar xQuad = ~~( xPos * invertedHalfWidth );","IsDeferred":false},{"Name":"If test","Code":"var xPos = Math.random() * width;\r\nvar xQuadLeft = 0;\r\nif( xPos \u003E= halfWidth ) xQuadLeft = 1;","IsDeferred":false},{"Name":"If test 2","Code":"var xPos = Math.random() * width;\r\nif( xPos \u003C halfWidth ) var xQuadLeft = 0;\r\nelse var xQuadLeft = 1;","IsDeferred":false},{"Name":"True/false","Code":"var xPos = Math.random() * width;\r\nvar xQuadLeft;\r\nif( xPos \u003E= halfWidth ) xQuadLeft = true;","IsDeferred":false}]}