BoundedFloatModule

PackageReified.Refinements
Operations over bounded values whose bounds carry a numeric width.

Summary

NameSignatureSynopsis
normalizeBoundedFloat.normalize inputReturns the value's position within its bounds as a fraction from zero to one.
denormalizeBoundedFloat.denormalize bounds fractionReturns the value at the given fraction of the interval.

normalize

BoundedFloat.normalize input
Member
Returns the value's position within its bounds as a fraction from zero to one. Degenerate bounds — where lower equals upper — normalize to zero rather than dividing by it.

Parameters

NameTypeDescription
inputBounded<float>

Returns

float

denormalize

BoundedFloat.denormalize bounds fraction
Member
Returns the value at the given fraction of the interval.

Parameters

NameTypeDescription
boundsInterval<float>
fractionfloat

Returns

Bounded<float>