Calculates the volume of a pyramid given the base area and height, or the base dimensions and height.