m Change plot bounds to be more symmetric |
style, fixup |
||
Line 17: | Line 17: | ||
|Plots= | |Plots= | ||
[ | [ | ||
{"Type": "function", "Function": "x", "Samples": 2, "Label": " | {"Type": "function", "Function": "x", "Samples": 2, "Label": "*", "Ranges":[{"From": "0", "To": "1"}]}, | ||
{"Type": "function", "Function": "0", "Samples": 2, "Color": 1, "Ranges":[{"To": "0"}]}, | {"Type": "function", "Function": "0", "Samples": 2, "Color": 1, "Ranges":[{"To": "0"}]}, | ||
{"Type": "function", "Function": "1", "Samples": 2, "Color": 1, "Ranges":[{"From": "1"}]} | {"Type": "function", "Function": "1", "Samples": 2, "Color": 1, "Ranges":[{"From": "1"}]} | ||
Line 23: | Line 23: | ||
}} | }} | ||
'''Clamp 01''' clamps the provided numeric value between 0 and 1. | The '''Clamp 01''' node clamps the provided numeric value between 0 and 1. | ||
== Inputs == | == Inputs == | ||
Line 45: | Line 45: | ||
File:Protoflux example clamp 01.webp|Four examples of the Clamp 01 node. | File:Protoflux example clamp 01.webp|Four examples of the Clamp 01 node. | ||
</gallery> | </gallery> | ||
== See Also == | |||
* [[ProtoFlux:Value Clamp]], for clamping between arbitrary bounds. | |||
[[Category:ProtoFlux:Math]] | [[Category:ProtoFlux:Math]] |
Latest revision as of 19:45, 8 July 2024
Clamp01
Math
*
The Clamp 01 node clamps the provided numeric value between 0 and 1.
Inputs
N (Generic)
A numeric value.
Outputs
* (Generic)
The input value, with the following conditions:
- If
N < 0
, output0
- If
N > 1
, output1
- Otherwise, output
N
In the case of types with multiple values, each individual value will be clamped.
Examples
-
Four examples of the Clamp 01 node.
See Also
- ProtoFlux:Value Clamp, for clamping between arbitrary bounds.