Float node
Use the Float node to access preset float variables and common methods for decimal numbers.
Read time 2 minutesLast updated a day ago
The Float node creates a preset float value which you can use to compare or set values in your logic. A float is a number that can have decimal places, for example, 3.14 or −0.5.
Variables
Expand the node to view available variables you can use with the Float node:Variable | Type | Description |
|---|---|---|
| Epsilon | | The smallest positive float value greater than zero. Use to set another variable to this value or compare floating-point numbers for equality. |
| MinValue | | The smallest possible float value, which is approximately −3.402823e38. Use to initialize or set variables to the lowest possible value or for comparisons. |
| MaxValue | | The largest possible float value, which is approximately 3.402823e38. Use to initialize or set variables to the highest possible value or for comparisons. |
| NaN | | Represents a value that's not a number. Use to check if a variable is undefined or for unrepresentable mathematical operations, such as dividing zero by zero. |
| NegativeInfinity | | Represents negative infinity. Use to check if a variable is negative infinity, which can be the result of mathematical operations that overflow in the negative direction, such as dividing a negative number by zero. |
| PositiveInfinity | | Represents positive infinity. Use to check if a variable is positive infinity, which can be the result of mathematical operations that overflow in the positive direction, such as dividing a positive number by zero. |
Methods
Expand the node to view available methods you can use with the Float node:Method | Return type | Description |
|---|---|---|
| Is Finite | | Returns true if a variable is a finite number (not NaN, PositiveInfinity, or NegativeInfinity). Use to validate input or results of calculations. |
| Is Infinity | | Returns true if a variable is either positive infinity or negative infinity. Use to validate input or results of calculations. |
| Is Not a Number | | Returns true if a variable isn't a number (NaN). Use to check if a variable isn't a number or if a calculation resulted in an undefined value. |
| Is Negative Infinity | | Returns true if a variable is NegativeInfinity. |
| Is Negative | | Returns true if a variable is less than zero. Use to check for negative values. |
| Is Normal | | Returns true if a variable is a normal number (not zero, subnormal, infinity, or NaN). Use to check if a variable is a normal number. |
| Is Positive Infinity | | Returns true if a variable is PositiveInfinity. |
| Is Subnormal | | Returns true if a variable is a tiny number that's represented with less precision than normal numbers. |
| Parse | | Converts a string representation of a number to its float equivalent. Use to convert user input or data from text sources into a float value. Throws an exception if the string isn't a valid number. |
| Try Parse | | Tries to convert a string representation of a number to its float equivalent and returns a Boolean that indicates whether the conversion was successful. Use to safely handle user input or data from text sources with no thrown exceptions from invalid formats. |