Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solve(input) {
- for (let i = 0; i<input.length; i+=3){
- let x = input[i];
- let y = input[i+1];
- let z = input[i+2];
- if (inVolume(x,y,z)){
- console.log('inside');
- } else {
- console.log('outside');
- }
- }
- function inVolume(x, y, z) {
- let x1 = 10, x2 = 50;
- let y1 = 20, y2 = 80;
- let z1 = 15, z2 = 50;
- return x1 <= x && x <= x2 && y1 <= y && y <= y2 && z1 <= z && z <= z2;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement