JolieDoc for Port Math
From file math.iol
| Port Name | Location | Protocol |
|---|---|---|
| Math |
List of the available interfaces
Interface MathInterface
| Heading | Input type | Output type | Faults |
|---|---|---|---|
| abs | int |
int |
|
| pi | void |
double |
|
| pow | PowRequest |
double |
|
| random | void |
double |
|
| round | RoundRequestType |
double |
|
| summation | SummationRequest |
int |
Operation list
random( void )( double )
Returns a random number d such that 0.0 <= d="" <="" 1.0.<="" p="">
abs( int )( int )
Returns the absolute value of the input integer.
round( RoundRequestType )( double )
pi( void )( double )
Returns the PI constant
pow( PowRequest )( double )
Returns the result of .base to the power of .exponent (see request data type).
summation( SummationRequest )( int )
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.
Message type list
RoundRequestType
type RoundRequestType: double {
.decimals?: int
}
PowRequest
type PowRequest: void {
.base: double
.exponent: double
}
SummationRequest
type SummationRequest: void {
.from: int
.to: int
}