Interface IStdMathModule
MS-VBAL 6.1.2.10 Math Module
[StdLibModule(null)]
public interface IStdMathModule
Remarks
Formalizes the public interface of the standard library VBA.Math module.
Methods
Abs(VBVariantValue)
MS-VBAL 6.1.2.10.1 Abs
RuntimeSemanticsEvaluationResult<VBVariantValue> Abs(VBVariantValue Number)
Parameters
NumberVBVariantValueAny data value
Returns
- RuntimeSemanticsEvaluationResult<VBVariantValue>
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Gets the absolute value of a numeric value.
Atn(VBDoubleValue)
MS-VBAL 6.1.2.10.2 Atn
RuntimeSemanticsEvaluationResult<VBDoubleValue> Atn(VBDoubleValue Number)
Parameters
NumberVBDoubleValueAny VBDoubleValue containing a valid numeric value (i.e. not
NaN).
Returns
- RuntimeSemanticsEvaluationResult<VBDoubleValue>
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Gets the arctangent of a numeric value.
Cos(VBDoubleValue)
MS-VBAL 6.1.2.10.3 Cos
RuntimeSemanticsEvaluationResult<VBDoubleValue> Cos(VBDoubleValue Number)
Parameters
NumberVBDoubleValueAny VBDoubleValue containing a valid numeric value (i.e. not
NaN) representing an angle in radians.
Returns
- RuntimeSemanticsEvaluationResult<VBDoubleValue>
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Gets the cosine of a numeric value.
Exp(VBDoubleValue)
MS-VBAL 6.1.2.10.4 Exp
RuntimeSemanticsEvaluationResult<VBDoubleValue> Exp(VBDoubleValue Number)
Parameters
NumberVBDoubleValueAny VBDoubleValue containing a valid numeric value (i.e. not
NaN) representing the power to raiseeby.
Returns
- RuntimeSemanticsEvaluationResult<VBDoubleValue>
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.
Log(VBDoubleValue)
MS-VBAL 6.1.2.10.5 Log
RuntimeSemanticsEvaluationResult<VBDoubleValue> Log(VBDoubleValue Number)
Parameters
NumberVBDoubleValueAny VBDoubleValue containing a valid numeric value (i.e. not
NaN) greater than zero.
Returns
- RuntimeSemanticsEvaluationResult<VBDoubleValue>
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Gets the natural logarithm of a numeric value.
Randomize(VBVariantValue?)
MS-VBAL 6.1.2.10.2.1 Randomize
RuntimeSemanticsEvaluationResult Randomize(VBVariantValue? Number = null)
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.
Rnd(VBVariantValue?)
MS-VBAL 6.1.2.10.6 Rnd
RuntimeSemanticsEvaluationResult<VBSingleValue> Rnd(VBVariantValue? Number = null)
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<VBSingleValue>
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 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.
Round(VBVariantValue, VBLongValue?)
MS-VBAL 6.1.2.10.7 Round
RuntimeSemanticsEvaluationResult<VBVariantValue> Round(VBVariantValue Number, VBLongValue? NumDigitsAfterDecimal = null)
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<VBVariantValue>
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.
Sgn(VBVariantValue)
MS-VBAL 6.1.2.10.8 Sgn
RuntimeSemanticsEvaluationResult<VBVariantValue> Sgn(VBVariantValue Number)
Parameters
NumberVBVariantValueAny VBVariantValue containing a valid numeric value (i.e. not
NaN).
Returns
- RuntimeSemanticsEvaluationResult<VBVariantValue>
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.
Sin(VBDoubleValue)
MS-VBAL 6.1.2.10.9 Sin
RuntimeSemanticsEvaluationResult<VBDoubleValue> Sin(VBDoubleValue Number)
Parameters
NumberVBDoubleValueAny VBDoubleValue containing a valid numeric value (i.e. not
NaN) representing an angle in radians.
Returns
- RuntimeSemanticsEvaluationResult<VBDoubleValue>
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Gets the sine of a numeric value.
Sqr(VBDoubleValue)
MS-VBAL 6.1.2.10.10 Sqr
RuntimeSemanticsEvaluationResult<VBDoubleValue> Sqr(VBDoubleValue Number)
Parameters
NumberVBDoubleValueAny VBDoubleValue containing a valid numeric value (i.e. not
NaN) greater than0.
Returns
- RuntimeSemanticsEvaluationResult<VBDoubleValue>
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Gets the square root of a numeric value.
Tan(VBDoubleValue)
MS-VBAL 6.1.2.10.11 Tan
RuntimeSemanticsEvaluationResult<VBDoubleValue> Tan(VBDoubleValue Number)
Parameters
NumberVBDoubleValueAny VBDoubleValue containing a valid numeric value (i.e. not
NaN) representing an angle in radians.
Returns
- RuntimeSemanticsEvaluationResult<VBDoubleValue>
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Gets the tangent of a numeric value.