{"ScriptPreparationCode":"var boundingRect = { x: 10, y: 10, width: 100, height: 50 };\r\nvar x = 20;\r\nvar y = 20;\r\n\r\nconst canvas = document.createElement(\u0027canvas\u0027);\r\nvar ctx = canvas.getContext(\u00272d\u0027);\r\nvar rectanglePath2D = new Path2D();\r\nrectanglePath2D.rect(boundingRect.x, boundingRect.y, boundingRect.width, boundingRect.height);\r\n\r\nconst maxX = boundingRect.x \u002B boundingRect.width;\r\nconst maxY = boundingRect.y \u002B boundingRect.height;\r\nfunction calculateViaMath() {\r\n return (boundingRect.x \u003C= x) \u0026\u0026 (x \u003C= maxX) \u0026\u0026 (boundingRect.y \u003C= y) \u0026\u0026 (x \u003C= maxY)\r\n}","TestCases":[{"Name":"path2d","Code":"ctx.isPointInPath(rectanglePath2D, x, y);","IsDeferred":false},{"Name":"math","Code":"calculateViaMath()","IsDeferred":false}]}