frustrum function: added explicit float conversion to avoid integer division