Skip to main content

Floor

This node rounds a number down to the nearest integer.

The Floor node applies the mathematical floor function to round numbers downward.

The Floor node takes a numeric input and returns the largest integer less than or equal to the input value. This is useful for rounding down decimal numbers to whole numbers.

Inputs

Input

DataDescription
ValueThe number to round down (default: 0)

Actions

SignalDescription
DoTriggers the floor calculation

Outputs

DataDescription
Floor ValueThe input value rounded down to the nearest integer
SignalDescription
DoneTriggered when the calculation is complete

Usage

The Floor node is essential for mathematical operations that require downward rounding:

  • Always rounds toward negative infinity
  • Converts decimal numbers to integers
  • Handles both positive and negative numbers
  • Includes input validation and error handling

Example Use Cases

  1. Index Calculations: Convert floating-point positions to array indices
  2. Grid Systems: Calculate grid coordinates from pixel positions
  3. Pagination: Determine page numbers from item counts
  4. Game Development: Convert continuous values to discrete steps

Examples

InputOutput
4.24
4.84
4.04
-2.3-3
-2.8-3

Error Handling

The node will log errors and not perform calculations if:

  • Input value is not a valid number
  • Input value exceeds the allowed range (-1 trillion to 1 trillion)
  • The result would exceed the allowed range