## Volume Calc FunctionMath Geometry Class

Public Function VolumeCalc( _
Optional ByVal vShape As Variant _
, Optional ByVal vBaseOrRadius As Variant _
, Optional ByVal vHeightOrRadius2 As Variant _
, Optional ByVal vDepthOrTop As Variant _
) As Variant

### "Volume Calculator" Calculate the Volume of some type of shape given certain other properties of the shape.

Examples:
VolumeCalc("Cone", 2, 3) = 12.5663706143592
VolumeCalc("Cone", 2, 4) = 16.7551608191456
VolumeCalc("Cylinder", 2, 3) = 37.6991118430775
VolumeCalc("Cylinder", 2, 4) = 50.2654824574367
IsNull(VolumeCalc("Unknown", 2, 3, 4)) = True
AreaCalc Function
CubeCalc Function, et. al.
The meaning of each argument and the arguments that must be provided differ depending upon the shape whose area is to be calculated. See the details below which describe the properties that must be passed for each type of shape.
vShape: Name of the geometric shape whose volume is being calculated. Function returns Null if vShape is Null or cannot be fixed up to a String. The shape must be one of those detailed below. This name is case-insensitive, so for example, the names "CUBE" and "Cube" match each other.

vBaseOrRadius: The base or (first) radius of the shape. This value should be a number if it is known. If this value is not applicable to the shape, it should be missing or Null.
vHeightOrRadius2: The height or second radius of the shape. This value should be a number if it is known. If this value is not applicable to the shape, it should be missing or Null.
vDepthOrTop: The depth or top of the shape. This value should be a number if it is known. If this value is not applicable to the shape, it should be missing or Null.
Note: Function may return a complex number in the form of a string if the given dimensions are not consistent with the shape.