Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool check_entry(double x, double y) {
- bool top_triangle = (y <= 1.) && (y >= x) && (y >= -x);
- bool bottom_triangle = (y >= -1.) && (y <= x) && (y <= -x);
- return top_triangle || bottom_triangle;
- }
- return fabs(x) < fabs(y) && fabs(y) < 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement