ProtoFlux:Avg: Difference between revisions

From Resonite Wiki
to the protoflux standard
Fixed types to "Pseudo-generic" in descriptions.
 
(6 intermediate revisions by 2 users not shown)
Line 13: Line 13:
|}}
|}}


== Usage ==
The '''Avg''' node returns the [https://en.wikipedia.org/wiki/Arithmetic_mean arithmetic mean] of two values.
The <code>Avg</code> node returns the [https://en.wikipedia.org/wiki/Arithmetic_mean arithmetic mean] of two values.


== Inputs ==
== Inputs ==


=== A (Dummy) ===
=== A (Pseudo-generic) ===
A value.
A value.


=== B (Dummy) ===
=== B (Pseudo-generic) ===
A value. This value must match the type of <code>A</code>.
A value. This value must match the type of <code>A</code>.


== Outputs ==
== Outputs ==


=== * (Dummy) ===
=== * (Pseudo-generic) ===
The arithmetic mean of the two inputs.
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