didkoslawow

Untitled

Sep 30th, 2022
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. function point(input) {
  2.  
  3. let x1 = Number(input[0]); //2
  4. let y1 = Number(input[1]); //-3
  5. let x2 = Number(input[2]); // 12
  6. let y2 = Number(input[3]); // 3
  7. let x = Number(input[4]); // 6.28
  8. let y = Number(input[5]); // -3
  9.  
  10.  
  11. if ((x === x1 || x === x2) && (y1 <= y && y <= y2)) {
  12. console.log("Border");
  13. } else if ((y === y1 || y === y2) && (x1 <= x && x <= x2)) {
  14. console.log("Border");
  15. } else {
  16. console.log("Inside / Outside");
  17. }
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment