XenoGuard Documentation

Floor

Actions » Programming » Number Operation » Float » Floor

The action 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.

[-] Hide
  1. Open the Programming node in the Workspace Explorer.
  2. Open the Number Operation node.
  3. In the Float node, select the Floor action.

Parameters:

The action 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 action returns the following results:


NAME
DESCRIPTION
Result Contains the floor number 

Allowed Context Scopes [Fixed, Local, Global]
Allowed Context Types [Variable, Parameter]

Warning

The number type set in the action 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.

Information Using the Floor action 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.

See other float operations:

Round
Truncate
Ceiling
Absolute