Help needed in creating an AABB function

Blitz3D Forums/Blitz3D Programming/Help needed in creating an AABB function

I can think of a kludgy way of doing it, but I'm no mathematician and there's probably a much faster way of doing it using maths...

if you were to take 6 planes and move them towards the object until they intersect, then rotate until they don't, then move towards until they do again, repeat until they always intersect, you could approximate a box around the object like that, couldn't you?