about | help | code help+videos | done | prefs |
isInRect() -- given a rectangle whose top left corner is at (tx, ty) and whose bottom right corner is at (bx, by), and a point (x, y), return true if the point is inside the rectangle. A point on the line of the rectangle is considered inside the rectangle. The coordinate system is that used for computer graphics. This is to say, X values increase from left to right, and Y values increase from top to bottom. isInRect(1, 1, 4, 4, 1, 1) → true isInRect(1, 1, 4, 4, 1, 4) → true isInRect(1, 1, 4, 4, 4, 1) → true ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 170 Post-solution available
Copyright Nick Parlante 2017 - privacy