Interface IStdMathModule
MS-VBAL 6.1.2.10 Math Module
public interface IStdMathModule
Remarks
Formalizes the public interface of the standard library VBA.Math module.
Methods
StdMath__Abs(VBVariantValue)
MS-VBAL 6.1.2.10.1 Abs
RuntimeSemanticsEvaluationResult StdMath__Abs(VBVariantValue Number)
Parameters
NumberVBVariantValueAny data value
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Gets the absolute value of a numeric value.
StdMath__Atn(VBDoubleValue)
MS-VBAL 6.1.2.10.2 Atn
RuntimeSemanticsEvaluationResult StdMath__Atn(VBDoubleValue Number)
Parameters
NumberVBDoubleValueAny VBDoubleValue containing a valid numeric value (i.e. not
NaN).
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Gets the arctangent of a numeric value.
StdMath__Cos(VBDoubleValue)
MS-VBAL 6.1.2.10.3 Cos
RuntimeSemanticsEvaluationResult StdMath__Cos(VBDoubleValue Number)
Parameters
NumberVBDoubleValueAny VBDoubleValue containing a valid numeric value (i.e. not
NaN) representing an angle in radians.
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Gets the cosine of a numeric value.
StdMath__Exp(VBDoubleValue)
MS-VBAL 6.1.2.10.4 Exp
RuntimeSemanticsEvaluationResult StdMath__Exp(VBDoubleValue Number)
Parameters
NumberVBDoubleValueAny VBDoubleValue containing a valid numeric value (i.e. not
NaN) representing the power to raiseeby.
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Gets the value of e (the base of natural logarithms, ~2.718282) raised to a specified power.
StdMath__Log(VBDoubleValue)
MS-VBAL 6.1.2.10.5 Log
RuntimeSemanticsEvaluationResult StdMath__Log(VBDoubleValue Number)
Parameters
NumberVBDoubleValueAny VBDoubleValue containing a valid numeric value (i.e. not
NaN) greater than zero.
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Gets the natural logarithm of a numeric value.
StdMath__Randomize(VBVariantValue)
MS-VBAL 6.1.2.10.2.1 Randomize
RuntimeSemanticsEvaluationResult StdMath__Randomize(VBVariantValue Number)
Parameters
NumberVBVariantValueA VBNumericTypedValue representing a seed value.
Optional: VBMissingValue or VBEmptyValue yields a new seed value from the host-provided pseudo-random number generator.
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Initializes the pseudo-random number generator configured in the current host environment.
StdMath__Rnd(VBVariantValue)
MS-VBAL 6.1.2.10.6 Rnd
RuntimeSemanticsEvaluationResult StdMath__Rnd(VBVariantValue Number)
Parameters
NumberVBVariantValueAny VBSingleValue containing a valid numeric value (i.e. not
NaN) specifying the runtime semantics of the function.
Optional: a VBMissingValue parameter behaves as if an integer value greater than zero was supplied.
👉 If the value is:<ul><li><strong>less than</strong> <code>0</code>, function returns the value determined by using its input as a <em>seed</em>.</li><li><strong>equal to</strong> <code>0</code>, function returns the most recently generated <em>pseudo-random</em> value in the sequence determined by the current <em>seed</em>.</li><li><strong>omitted</strong> or <strong>greater than</strong> <code>0</code>, function returns the next <em>pseudo-random</em> value in the sequence determined by the current <em>seed</em>.</li></ul>
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Gets a VBSingleValue representing a pseudo-random numeric value less than 1 but greater than or equal to 0.
👉 The StdMath__Randomize(VBVariantValue) procedure should be invoked before this function is invoked, to initialize a seed based on the system timer.
The behavior of this function is implementation-defined (unspecified) otherwise.
StdMath__Round(VBVariantValue, VBLongValue)
MS-VBAL 6.1.2.10.7 Round
RuntimeSemanticsEvaluationResult StdMath__Round(VBVariantValue Number, VBLongValue NumDigitsAfterDecimal)
Parameters
NumberVBVariantValueAny VBVariantValue containing the numeric value to be rounded.
NumDigitsAfterDecimalVBLongValueAny VBLongValue containing representing the number of decimal places to the right of the decimal separator are included in the rounded result.
Optional: DefaultValue if omitted.
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Gets a numeric value rounded to a specified number of decimal places.
StdMath__Sgn(VBVariantValue)
MS-VBAL 6.1.2.10.8 Sgn
RuntimeSemanticsEvaluationResult StdMath__Sgn(VBVariantValue Number)
Parameters
NumberVBVariantValueAny VBDoubleValue containing a valid numeric value (i.e. not
NaN).
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Gets an integer value representing the sign of a specified number. If that number is:
- equal to zero, the function returns
0; - greater than zero, the function returns
1; - less than zero, the function returns
-1.
StdMath__Sin(VBDoubleValue)
MS-VBAL 6.1.2.10.9 Sin
RuntimeSemanticsEvaluationResult StdMath__Sin(VBDoubleValue Number)
Parameters
NumberVBDoubleValueAny VBDoubleValue containing a valid numeric value (i.e. not
NaN) representing an angle in radians.
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Gets the sine of a numeric value.
StdMath__Sqr(VBDoubleValue)
MS-VBAL 6.1.2.10.10 Sqr
RuntimeSemanticsEvaluationResult StdMath__Sqr(VBDoubleValue Number)
Parameters
NumberVBDoubleValueAny VBDoubleValue containing a valid numeric value (i.e. not
NaN) greater than0.
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Gets the square root of a numeric value.
StdMath__Tan(VBDoubleValue)
MS-VBAL 6.1.2.10.11 Tan
RuntimeSemanticsEvaluationResult StdMath__Tan(VBDoubleValue Number)
Parameters
NumberVBDoubleValueAny VBDoubleValue containing a valid numeric value (i.e. not
NaN) representing an angle in radians.
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Gets the tangent of a numeric value.