Method TruncatedNormalSample
TruncatedNormalSample(float, float, float, float, float)
Generates samples from a truncated normal distribution. Further reading about this distribution can be found here: https://en.wikipedia.org/wiki/Truncated_normal_distribution
Declaration
public static float TruncatedNormalSample(float uniformSample, float min, float max, float mean, float stdDev)
Parameters
Type | Name | Description |
---|---|---|
float | uniformSample | A sample value between 0 and 1 generated from a uniform distribution |
float | min | The minimum possible value to generate |
float | max | The maximum possible value to generate |
float | mean | The mean of the normal distribution |
float | stdDev | The standard deviation of the normal distribution |
Returns
Type | Description |
---|---|
float | A value sampled from a truncated normal distribution |
Exceptions
Type | Condition |
---|---|
ArgumentException |