Interface INormalizationStrategy
- Namespace
- FEFF.TestFixtures.AspNetCore.Randomness
- Assembly
- FEFF.TestFixtures.AspNetCore.dll
Defines how FakeRandom should handle generated values that fall outside the valid range of the target Random method.
public interface INormalizationStrategy
Methods
NormalizeDouble(double)
Normalizes an out-of-range double value to fit within the valid range [0.0, 1.0).
double NormalizeDouble(double next)
Parameters
nextdoubleThe raw generated value.
Returns
- double
A normalized value that NextDouble() should return.
NormalizeI32(int, int, int)
Normalizes an out-of-range int value to fit within min (inclusive) and max (exclusive).
int NormalizeI32(int next, int min, int max)
Parameters
nextintThe raw generated value.
minintThe inclusive lower bound of the method contract.
maxintThe exclusive upper bound of the method contract.
Returns
- int
A normalized value that the method should return.
NormalizeI64(long, long, long)
Normalizes an out-of-range long value to fit within min (inclusive) and max (exclusive).
long NormalizeI64(long next, long min, long max)
Parameters
nextlongThe raw generated value.
minlongThe inclusive lower bound of the method contract.
maxlongThe exclusive upper bound of the method contract.
Returns
- long
A normalized value that the method should return.
NormalizeSingle(float)
Normalizes an out-of-range float value to fit within the valid range [0.0, 1.0).
float NormalizeSingle(float next)
Parameters
nextfloatThe raw generated value.
Returns
- float
A normalized value that NextSingle() should return.