Advertisement
galink

Untitled

Jul 26th, 2017
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function figurePoint([arg1, arg2, arg3]) {
  2.     let h = Number(arg1);
  3.     let x = Number(arg2);
  4.     let y = Number(arg3);
  5.  
  6.     if ((x >= 0 && x <= 3 * h && y >= 0 && y <= h) || (x >= h && x <= h * 2 && y >= h && y <= 4)) {
  7.         if ((x > 0 && x < h * 3 && y > 0 && y < h) || (x > h && x < h * 2 && y > h && y < h * 4)) {
  8.             console.log('inside');
  9.  
  10.         } else if (x > h && x < 2 * h && y == h) {
  11.             console.log('inside');
  12.         }
  13.     } else {
  14.         console.log('outside');
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement