XenoGuard Documentation

Absolute

Actions » Programming » Number Operation » Float » Absolute

The action Absolute returns the positive value of a specified number and stores the number in Result of the result list. The following number types are allowed: Floating PointSigned Number, and Unsigned Number.  

[-] Hide
  1. Open the Programming node in the Workspace Explorer.
  2. Open the Number Operation node.
  3. In the Float node, select the Absolute 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 Scopes
 [Fixed, Local, Global]
Allowed Values [Floating Point, Signed Number, Unsigned Number]
Source
The number to be returned with a positive 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 absolute number 

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

Warning

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

Example 1 (Converts the negative value to a positive value):

This example subtracts the Start Point and End Point variables. Both variables have a Floating Point data type. The difference of the variables having a negative value was converted to its positive value. The result of the number is then output via Write Text.

See other float operations:

Round
Truncate
Ceiling
Floor