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(VBRuntimeVariantValue)
MS-VBAL 6.1.2.10.1 Abs
RuntimeSemanticsEvaluationResult StdMath__Abs(VBRuntimeVariantValue Number)
Parameters
NumberVBRuntimeVariantValueAny 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(VBRuntimeValue<double>)
MS-VBAL 6.1.2.10.2 Atn
RuntimeSemanticsEvaluationResult StdMath__Atn(VBRuntimeValue<double> Number)
Parameters
NumberVBRuntimeValue<double>Any 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(VBRuntimeValue<double>)
MS-VBAL 6.1.2.10.3 Cos
RuntimeSemanticsEvaluationResult StdMath__Cos(VBRuntimeValue<double> Number)
Parameters
NumberVBRuntimeValue<double>Any 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(VBRuntimeValue<double>)
MS-VBAL 6.1.2.10.4 Exp
RuntimeSemanticsEvaluationResult StdMath__Exp(VBRuntimeValue<double> Number)
Parameters
NumberVBRuntimeValue<double>Any 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(VBRuntimeValue<double>)
MS-VBAL 6.1.2.10.5 Log
RuntimeSemanticsEvaluationResult StdMath__Log(VBRuntimeValue<double> Number)
Parameters
NumberVBRuntimeValue<double>Any 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(VBRuntimeVariantValue)
MS-VBAL 6.1.2.10.2.1 Randomize
RuntimeSemanticsEvaluationResult StdMath__Randomize(VBRuntimeVariantValue Number)
Parameters
NumberVBRuntimeVariantValueA 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(VBRuntimeVariantValue)
MS-VBAL 6.1.2.10.6 Rnd
RuntimeSemanticsEvaluationResult StdMath__Rnd(VBRuntimeVariantValue Number)
Parameters
NumberVBRuntimeVariantValueAny 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(VBRuntimeVariantValue, VBRuntimeValue<int>)
MS-VBAL 6.1.2.10.7 Round
RuntimeSemanticsEvaluationResult StdMath__Round(VBRuntimeVariantValue Number, VBRuntimeValue<int> NumDigitsAfterDecimal)
Parameters
NumberVBRuntimeVariantValueAny VBVariantValue containing the numeric value to be rounded.
NumDigitsAfterDecimalVBRuntimeValue<int>Any 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(VBRuntimeVariantValue)
MS-VBAL 6.1.2.10.8 Sgn
RuntimeSemanticsEvaluationResult StdMath__Sgn(VBRuntimeVariantValue Number)
Parameters
NumberVBRuntimeVariantValueAny 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(VBRuntimeValue<double>)
MS-VBAL 6.1.2.10.9 Sin
RuntimeSemanticsEvaluationResult StdMath__Sin(VBRuntimeValue<double> Number)
Parameters
NumberVBRuntimeValue<double>Any 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(VBRuntimeValue<double>)
MS-VBAL 6.1.2.10.10 Sqr
RuntimeSemanticsEvaluationResult StdMath__Sqr(VBRuntimeValue<double> Number)
Parameters
NumberVBRuntimeValue<double>Any 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(VBRuntimeValue<double>)
MS-VBAL 6.1.2.10.11 Tan
RuntimeSemanticsEvaluationResult StdMath__Tan(VBRuntimeValue<double> Number)
Parameters
NumberVBRuntimeValue<double>Any 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.