Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function point(input) {
- let x1 = Number(input[0]); //2
- let y1 = Number(input[1]); //-3
- let x2 = Number(input[2]); // 12
- let y2 = Number(input[3]); // 3
- let x = Number(input[4]); // 6.28
- let y = Number(input[5]); // -3
- if ((x === x1 || x === x2) && (y1 <= y && y <= y2)) {
- console.log("Border");
- } else if ((y === y1 || y === y2) && (x1 <= x && x <= x2)) {
- console.log("Border");
- } else {
- console.log("Inside / Outside");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment