Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function figurePoint([arg1, arg2, arg3]) {
- let h = Number(arg1);
- let x = Number(arg2);
- let y = Number(arg3);
- if ((x >= 0 && x <= 3 * h && y >= 0 && y <= h) || (x >= h && x <= h * 2 && y >= h && y <= 4)) {
- if ((x > 0 && x < h * 3 && y > 0 && y < h) || (x > h && x < h * 2 && y > h && y < h * 4)) {
- console.log('inside');
- } else if (x > h && x < 2 * h && y == h) {
- console.log('inside');
- }
- } else {
- console.log('outside');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement