Step
(Engine-Level Function)
Description: | Transforms a continuous value into discrete steps. |
Returns: | Numeric |
Usage: ![]() |
Script or steady state. |
Function Groups: | Rounding Math |
Related to: | Abs | Ceil | Int | Scale |
Format: ![]() |
Step(X, Size, Increment) |
Parameters: |
X |
Required. Any numeric expression giving the value to reduce to discrete steps. |
Size |
Required. Any numeric expression giving the size of the steps in the X input parameter. |
Increment |
Required. Any numeric expression giving the size of the step in the result. |
Comments: |
The return value is arrived at by dividing X by Size and taking only the portion before the decimal point, then multiplying by Increment. Note that negative numbers are taken down to the next lower number (e.g. -0.1 becomes -1). If any parameters are invalid, the return value is invalid. This function does calculations with double-precision floating point values and does not support 64-bit integers computations. |
Examples:
p = Step( 4, 1.5, 2); q = Step( 2.31, 2, 10); r = Step(10, 100, 0.25);
The values for p, q and r will be 4, 10 and 0 respectively.