{"ScriptPreparationCode":null,"TestCases":[{"Name":"Math.sqrt","Code":"const x = 1;\r\nconst y = -1;\r\nconst velocity = { x: 0, y: 0 };\r\nconst length = Math.sqrt(x * x \u002B y * y);\r\nvelocity.x = length \u003E 0 ? x / length : 0;\r\nvelocity.y = length \u003E 0 ? y / length : 0;","IsDeferred":false},{"Name":"all squared","Code":"const x = 1;\r\nconst y = -1;\r\nconst velocity = { x: 0, y: 0 };\r\nconst lengthSquared = x ** 2 \u002B y ** 2;\r\nvelocity.x = (lengthSquared \u003E 0 ? x ** 2 / lengthSquared : 0) * (x \u003C 0 ? -1 : 1);\r\nvelocity.y = (lengthSquared \u003E 0 ? y ** 2 / lengthSquared : 0) * (y \u003C 0 ? -1 : 1);","IsDeferred":false},{"Name":"all squared 1","Code":"const x = 1;\r\nconst y = -1;\r\nconst velocity = { x: 0, y: 0 };\r\nconst lengthSquared = x ** 2 \u002B y ** 2;\r\nconst velocityScale = lengthSquared \u003E 0 ? 1 / lengthSquared : 0;\r\nvelocity.x = x * velocityScale;\r\nvelocity.y = y * velocityScale;","IsDeferred":false}]}