<-- Previous || Up || Next -->

Cone Calc Function
Math Geometry Class

Public Function ConeCalc( _
      Optional ByVal vArea As Variant _
    , Optional ByVal vDiameter As Variant _
    , Optional ByVal vHeight As Variant _
    , Optional ByVal vRadius As Variant _
    , Optional ByVal vSide As Variant _
    , Optional ByVal vVolume As Variant _
    ) As Variant

"Cone Calculator"
Calculate some property about cones given the value of two other properties (H & R/D/S or S & R/D).

    ConeCalc("CALC", Null, 5, 2, Null, Null) = 33.8359883929281
    ConeCalc(vHeight:=5, vRadius:=2, vArea:="CALC") = 33.8359883929281
    ConeCalc(vHeight:=3, vSide:=5, vArea:="CALC") = 62.8318530717959
    ConeCalc(vHeight:=5, vSide:=3, vArea:="CALC") = "0|37.6991118430776" ' #3
    IsNull(ConeCalc(vHeight:=5, vArea:=3, vSide:="CALC")) = True ' #4
See also:
    CylinderCalc Function
Summary: Two of the arguments should contain a numeric value--the given values for those properties. Pass the word "CALC" to the argument whose value is to be calculated and returned by this function. The other arguments should be missing or Null or non-numeric. Function returns Null if it could not calculate the requested property from the values provided. Otherwise, the function returns the value of the property whose argument was passed the word "CALC".
vArea: Area of the cone.
vDiameter: Diameter of the base of the cone.
vHeight: Height of the cone.
vRadius: Radius of the base of the cone.
vSide: Length of the side of the cone.
vVolume: Volume of the cone.
Note: This function does not accept all combinations of two known properties; see the details below, as in example #4.
Note: Function may return a complex number in the form of a string if the given dimensions are not consistent with the shape, as in example #3.
Note: The match on the word "CALC" is case-insensitive, so for example, "CALC" and "Calc" match each other.

Note: This function can calculate any property given any of following combinations of properties (property pairs listed in alphabetical order):

    Diameter, Side
    Height, Diameter
    Height, Radius
    Height, Side
    Radius, Side

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.