Math
Inclusion code:
Service Deployment | |||
---|---|---|---|
Port Name | Location | Protocol | Interfaces |
Math documentation: | |||
Math | - | - | MathInterface |
List of Available Interfaces
MathInterface
Interface documentation:
Operation Name | Input Type | Output Type | Faults |
---|---|---|---|
random | void | double | |
abs | int | int | |
round | RoundRequestType | double | |
pi | void | double | |
pow | PowRequest | double | |
summation | SummationRequest | int |
Operation Description
random
Operation documentation: Returns a random number d such that 0.0 <= d < 1.0.
Invocation template:
random@Math( request )( response )
Request type
Type: void
void : void
Response type
Type: double
double : double
abs
Operation documentation: Returns the absolute value of the input integer.
Invocation template:
abs@Math( request )( response )
Request type
Type: int
int : int
Response type
Type: int
int : int
round
Operation documentation: Returns the PI constant
Invocation template:
round@Math( request )( response )
Request type
Type: RoundRequestType
type RoundRequestType: double {
.decimals?: int
}
RoundRequestType : double
decimals : int
Response type
Type: double
double : double
pi
Operation documentation: Returns the PI constant
Invocation template:
pi@Math( request )( response )
Request type
Type: void
void : void
Response type
Type: double
double : double
pow
Operation documentation: Returns the result of .base to the power of .exponent (see request data type).
Invocation template:
pow@Math( request )( response )
Request type
Type: PowRequest
type PowRequest: void {
.base: double
.exponent: double
}
PowRequest : void
base : double
exponent : double
Response type
Type: double
double : double
summation
Operation documentation: Returns the summation of values from .from to .to (see request data type). For example, .from=2 and .to=5 would produce a return value of 2+3+4+5=14.
Invocation template:
summation@Math( request )( response )
Request type
Type: SummationRequest
type SummationRequest: void {
.from: int
.to: int
}
SummationRequest : void
from : int
to : int
Response type
Type: int
int : int