Distance value between pivot and entity surface

Blitz3D Forums/Blitz3D Programming/Distance value between pivot and entity surface

..what would be cheapest way to achieve this? I mean, to get distance between pivot point for example and any side of cube (pivot is placed inside cube)?