Reference, a, b)

A simple conditional operator. Given a gate signal, g, on the range [0, 1], returns the signal a when the gate is high, and the signal b when the gate is low. For values of g between (0, 1), performs a linear interpolation between a and b.

Example:, a, b); // Equivalent to `a`, a, b); // Equivalent to `b`, a, b); // Constantly switching between `a` and `b`, a, b); // Constantly fading between `a` and `b`