Skip to content

Bool to Float

Maps true to 1.0 and false to 0.0.

At every sample, y = 1.0 if u is true; otherwise y = 0.0.

Direction Name Type
Input u bool
Output y f64

None.

Input samples true, false, true produce 1.0, 0.0, 1.0.