- you have 2 opposite corners of a cuboid, x1,y1,z1 and x2,y2,z2
- make sure x1 is less than x2 - if not, swap them
- make sure y1 is less than y2 - if not, swap them
- make sure z1 is less than z2 - if not, swap them
- you have a point (coordinates of the cart) x3,y3,z3
- if:
- - x3 greater than x1 and less than x2
- - y3 greater than y1 and less than y2
- - z3 greater than z1 and less than z2
- then the point (cart) must be inside the cuboid

# Posted by frymaster on Sun 30th Jun 02:26

download | new post

**Submit a correction or amendment below. (click here to make a fresh posting)**

After submitting an amendment, you'll be able to view the differences between the old and new posts easily.