<cfx_kmMath> cfx_kmSuite
Programming Reference

cfx_kmMath contains misc math functions.

Distance
DmsToDegrees
Factorial
GreatestCommonDivisor
Help
LeastCommonMultiple
Power
Version

Appendix C: Numeric Format Strings


F=Distance

Description
Compute the distance between two points.
Returns
Distance
Syntax
  <cfx_kmMath  F=Distance  V=variable  SHOW
      X1==integer
      Y1==integer
      X2==integer
      Y2==integer
      FORMAT=format >
Attribute   Description         Required?
X1= Y1=  Coordinates of the first point.  YES
X2= Y2=  Coordinates of the second point.  YES
FORMAT  Desired output format. (default="%.2f")
For more information, refer to Appendix C: Numeric Format Strings.
 no


F=DmsToDegrees

Description
Convert degrees minutes and seconds to decimal degrees.
Returns
Decimal degree value.
Syntax
  <cfx_kmMath  F=DmsToDegrees  V=variable  SHOW
      DEGREES==integer
      MINUTES==integer
      SECONDS==integer
      FORMAT=format >
Attribute   Description         Required?
DEGREES=  Number of whole degrees. Default is zero.  no
MINUTES=  Number of minutes. Default is zero.  no
SECONDS=  Number of seconds. Default is zero.  no
FORMAT  Desired output format. (default="%.2f")
For more information, refer to Appendix C: Numeric Format Strings.
 no


F=Factorial

Description
Return the factorial of a number.
Returns
Factorial.
Syntax
  <cfx_kmMath  F=Factorial  V=variable  SHOW
      VALUE==integer >
Attribute   Description         Required?
VALUE=  Input value.  YES


F=GreatestCommonDivisor

Description
Return the greatest common divisor of two integers.
Returns
Greatest common divisor.
Syntax
  <cfx_kmMath  F=GreatestCommonDivisor  V=variable  SHOW
      VALUE1==integer
      VALUE2==integer >
Attribute   Description         Required?
VALUE1=  Input value.  YES
VALUE2=  Input value.  YES


F=LeastCommonMultiple

Description
Return the least common multiple of two integers.
Returns
Least common multiple.
Syntax
  <cfx_kmMath  F=LeastCommonMultiple  V=variable  SHOW
      VALUE1==integer
      VALUE2==integer >
Attribute   Description         Required?
VALUE1=  Input value.  YES
VALUE2=  Input value.  YES


F=Power

Description
Return a value raised to a specified power.
Returns
Value raised to power.
Syntax
  <cfx_kmMath  F=Power  V=variable  SHOW
      VALUE==integer
      POWER==integer >
Attribute   Description         Required?
VALUE=  Integer or decimal input value.  YES
POWER=  Power.  YES