I thought it was easy, and I guess I will figure it out but maybe someone already made this?

Code: Select all

```
function something(x,y, x1,y1, x2, y2)
-- here I can simply check that x > then x1 and x2
-- here I can simply check that x < then x1 and x2
-- here I can simply check that y > then y1 and y2
-- here I can simply check that y < then y1 and y2
-- but the combination I don't understand, to get the output I want.
return [top|bottom|left|right]
end
```

BBBBBBBB

BBBBBBBB A

BBBBBBBB

BBBBBBBB

Code: Select all

```
local bla = something(a.x, a.y, b.x1, b.y1, b.x2, b.y2)
bla == left
```

BBBBBBBB

BBBBBBBB

BBBBBBBB

BBBBBBBB

A

Code: Select all

```
local bla = something(a.x, a.y, b.x1, b.y1, b.x2, b.y2)
bla == bottom
```