Changeset View
Changeset View
Standalone View
Standalone View
manual/modeling/geometry_nodes/utilities/float_to_int.rst
| Property | Old Value | New Value |
|---|---|---|
| svn:eol-style | null | native \ No newline at end of property |
| .. index:: Geometry Nodes; Float To Int | |||||
| .. _bpy.types.GeometryNodeFloatToInt: | |||||
| ************ | |||||
| Float To Int | |||||
| ************ | |||||
| .. figure:: /images/modeling_geometry-nodes_utilities_float-to-int_node.png | |||||
| :align: right | |||||
| Float To Int Node. | |||||
| The *Float To Int* node takes a single floating point number input and converts it to an integer via a choice of methods. | |||||
| Inputs | |||||
| ====== | |||||
| Float | |||||
| Standard Float value input. | |||||
| Properties | |||||
| ========== | |||||
| Rounding Mode | |||||
| :Round: Returns the closest integer to Float, rounding either up or down based on the value. | |||||
| :Floor: Returns the closest integer less than Float, always rounding down. | |||||
| :Ceil: Returns the closest integer greater than Float, always rounding up. | |||||
| :Truncate: Returns the closest integer between Float and zero. For positive numbers, acts like Floor. For negative numbers, acts as Ceil. | |||||
| Output | |||||
| ====== | |||||
| Result | |||||
| Standard Integer output. | |||||
| Examples | |||||
| ======== | |||||
| +--------------+---------+---------+--------+------------+ | |||||
| | Input Value | Round | Floor | Ceil | Truncate | | |||||
| +==============+=========+=========+========+============+ | |||||
| | -69.6574 | -70 | -70 | -69 | -69 | | |||||
| +--------------+---------+---------+--------+------------+ | |||||
| | -3.14159 | -3 | -4 | -3 | -3 | | |||||
| +--------------+---------+---------+--------+------------+ | |||||
| | -1.5 | -2 | -2 | -1 | -1 | | |||||
| +--------------+---------+---------+--------+------------+ | |||||
| +--------------+---------+---------+--------+------------+ | |||||
| | 1.5 | 2 | 1 | 2 | 1 | | |||||
| +--------------+---------+---------+--------+------------+ | |||||
| | 3.14159 | 3 | 3 | 4 | 3 | | |||||
| +--------------+---------+---------+--------+------------+ | |||||
| | 69.6574 | 70 | 69 | 70 | 69 | | |||||
| +--------------+---------+---------+--------+------------+ | |||||