Skip to main content
Version: Current

foundation-filters.percentageparams

Home > @genesislcap/foundation-filters > PercentageParams

PercentageParams type

PercentageParams

Signature:

export type PercentageParams = {
readonly percent: number;
readonly random?: number;
};

Remarks

Percent should be a numeric value between 0 and 1.

Example 1

{
"percent": 0.5
}

Example 2

In a rare case where you need to control the random floating-point creation, you can do so externally and provide it.

{
"percent": 0.34
"random": 0.08901819974272063
}