ProtoFlux:Avg: Difference between revisions

From Resonite Wiki
add avg node
 
Fixed types to "Pseudo-generic" in descriptions.
 
(7 intermediate revisions by 2 users not shown)
Line 13: Line 13:
|}}
|}}


Returns the average of two values.
The '''Avg''' node returns the [https://en.wikipedia.org/wiki/Arithmetic_mean arithmetic mean] of two values.
 
== Inputs ==
 
=== A (Pseudo-generic) ===
A value.
 
=== B (Pseudo-generic) ===
A value. This value must match the type of <code>A</code>.
 
== Outputs ==
 
=== * (Pseudo-generic) ===
The arithmetic mean of the two inputs.
 
=== Examples ===
<gallery widths=480px heights=400px>
File:Protoflux example avg.webp|An example of using <code>Avg</code> for two colors, as well as [[ProtoFlux:Avg Multi|Avg Multi]] for four float values.
</gallery>


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

Latest revision as of 10:55, 22 May 2024

Avg
A
*
B
Math

The Avg node returns the arithmetic mean of two values.

Inputs

A (Pseudo-generic)

A value.

B (Pseudo-generic)

A value. This value must match the type of A.

Outputs

* (Pseudo-generic)

The arithmetic mean of the two inputs.

Examples