Floor
ActionStep Reference » Programming » Number Operation » Float » Floor
The ActionStep Floor rounds the number to the closest integer that is lesser than its value and stores the number in Result of the result list. Only the Floating Point data type is allowed.
- Open the Programming node in the Workspace Explorer.
- Open the Number Operation node.
- In the Float node, select the Floor ActionStep.
Parameters:
The ActionStep has the following input parameters:
NAME |
DESCRIPTION
|
---|---|
Number Type
|
Specifies the data type to be used for a number
Allowed Context Scope [Fixed] Allowed Value [Floating Point] |
Source
|
The number to be rounded to the closest integer that is lesser than its value
Allowed Context Scopes [Fixed, Local, Global] Allowed Context Types [Variable, Parameter, Enum] |
Results:
The ActionStep returns the following results:
NAME
|
DESCRIPTION
|
---|---|
Result |
Contains the floor number
Allowed Context Scopes [Fixed, Local, Global] Allowed Context Types [Variable, Parameter] |
The number type set in the ActionStep Floor determines the data type of its Result even if the variables and/or parameters that were set for the source are of different data types. |
Using the Floor ActionStep for a negative number rounds it to the closest integer that is greater than its value. For instance, -27.30 results in -28 as its floor value. |
Example 1 (Determine the floor value rating):
This example rounds the average value from two local variables, Rating 1 and Rating 2 with a Floating Point data type. The Result of the floor number is then output via the Message Box.