ProtoFlux:Ceil: Difference between revisions

From Resonite Wiki
add link to number type
cleanup
Line 12: Line 12:
|}}
|}}


{{#invoke:Plotter|Plot2D
The '''Ceil''' node returns the ceiling of the input type, or the smallest integral value greater than or equal to the specified number. This is also known as "rounding towards positive infinity".
|From=-2.5,-2.5
|To=2.5,2.5
|Plots=
[
{"Type": "function", "Function": "ceil(x)", "Samples": 2, "Label": "ceil", "Ranges": [
  {"To": "-2"},
  {"From": "-1.9999", "To": "-1"},
  {"From": "-0.9999", "To": "0"},
  {"From": "0.0001", "To": "1"},
  {"From": "1.0001", "To": "2"},
  {"From": "2.0001"}
]}
]
}}
 
The '''Ceil''' node rounds the input up to the next [[Type:Int|integer]] (towards positive infinity).


== Inputs ==
== Inputs ==
Line 38: Line 22:


=== * (Generic) ===
=== * (Generic) ===
The ceil of the input with a matching type. For types with multiple values, each individual value is ceiled.
The ceiling of the input with a matching type. For types with multiple values, each individual value is rounded up.
 
== See Also ==
* [https://learn.microsoft.com/en-us/dotnet/api/system.math.ceiling#system-math-ceiling(system-double) Microsoft documentation for the <code>Math.Ceiling(Double)</code> method.]


[[Category:ProtoFlux:Math]]
[[Category:ProtoFlux:Math]]

Revision as of 03:26, 5 June 2024

Ceil
N
*
Math

The Ceil node returns the ceiling of the input type, or the smallest integral value greater than or equal to the specified number. This is also known as "rounding towards positive infinity".

Inputs

N (Generic)

Numeric value to ceil.

Outputs

* (Generic)

The ceiling of the input with a matching type. For types with multiple values, each individual value is rounded up.

See Also