Difference between revisions of "Nearest Integer"

From Terragen Documentation from Planetside Software
Jump to: navigation, search
(Conformed layout & updated GUI image.)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
[[Image:drex_module_95_image_0.png|485pxpx|Nearest Integer]]
+
<div style="float:right; border-style:solid; padding:20px"><categorytree mode=pages hideroot=off>Round</categorytree></div>
  
'''Node Description & Purpose: '''<br /> The Nearest integer node takes the Input value and outputs the nearest integer, or whole number. It rounds decimal values less than .5 downward and decimal values of .5 and greater upward. For example:<br /><br /> An input of 2.2 will become 2.0<br /> An input of 2.5 will become 3.0<br /> An input of 2.9 will become 3.0<br /> An input of 5.0 will become 5.0<br /><br /> Despite it not being obvious from the node name, the Nearest integer node is essentially a scalar node.<br /><br /> Due to way floating point numbers are represented, the scalar output may not always be an exact integer.<br /><br />'''Node Type: ''' Function<br /><br />'''Settings: '''<br /> This node has no other settings apart from the Input node.
+
[[File:NearestInteger_00_GUI.png|none|470px|Nearest Integer]]
  
<!-- imported from file: module_95.html-->
 
  
[[Category:SRound| ]]
+
== Overview ==
 +
The Nearest integer node takes the Input value and outputs the nearest integer, or whole number. It rounds decimal values less than .5 downward and decimal values of .5 and greater upward. For example:<br /><br /> An input of 2.2 will become 2.0<br /> An input of 2.5 will become 3.0<br /> An input of 2.9 will become 3.0<br /> An input of 5.0 will become 5.0<br /><br /> Despite it not being obvious from the node name, the Nearest integer node is essentially a scalar node.<br /><br /> Due to way floating point numbers are represented, the scalar output may not always be an exact integer.<br /><br />This node has no other settings apart from the Input node.
 +
 
 +
 
 +
'''Settings:'''
 +
*'''Name: '''This setting allows you to apply a descriptive name to the node, which can be helpful when using multiple Nearest integer nodes in a project.
 +
*'''Enable:''' When checked, the node is active, and when unchecked the node is ignored.
 +
 
 +
 
 +
<br /n>
 +
 
 +
[[Category:Round]]

Latest revision as of 18:13, 6 April 2022

Nearest Integer


Overview[edit]

The Nearest integer node takes the Input value and outputs the nearest integer, or whole number. It rounds decimal values less than .5 downward and decimal values of .5 and greater upward. For example:

An input of 2.2 will become 2.0
An input of 2.5 will become 3.0
An input of 2.9 will become 3.0
An input of 5.0 will become 5.0

Despite it not being obvious from the node name, the Nearest integer node is essentially a scalar node.

Due to way floating point numbers are represented, the scalar output may not always be an exact integer.

This node has no other settings apart from the Input node.


Settings:

  • Name: This setting allows you to apply a descriptive name to the node, which can be helpful when using multiple Nearest integer nodes in a project.
  • Enable: When checked, the node is active, and when unchecked the node is ignored.



A scalar is a single number. 1, 200.45, -45, -0.2 are all examples of scalar values.

A single object or device in the node network which generates or modifies data and may accept input data or create output data or both, depending on its function. Nodes usually have their own settings which control the data they create or how they modify data passing through them. Nodes are connected together in a network to perform work in a network-based user interface. In Terragen 2 nodes are connected together to describe a scene.