Skip to content

float

const float: FloatPrimitive

Floating-point number primitive with optional chainable range constraints.

Example:

float // any number
float.min(0).max(1) // probability range

Throws:

When the raw value fails this primitive’s validation.

Learn: Primitives and builders

Last updated: