Click or drag to resize
DigitalRuneFastGaussianDistributionF Class
Creates random values using an approximate Gaussian distribution (single-precision).
Inheritance Hierarchy
SystemObject
  DigitalRune.Mathematics.StatisticsDistributionSingle
    DigitalRune.Mathematics.StatisticsFastGaussianDistributionF

Namespace: DigitalRune.Mathematics.Statistics
Assembly: DigitalRune.Mathematics (in DigitalRune.Mathematics.dll) Version: 1.14.0.0 (1.14.0.14427)
Syntax
public class FastGaussianDistributionF : Distribution<float>

The FastGaussianDistributionF type exposes the following members.

Constructors
  NameDescription
Public methodFastGaussianDistributionF
Initializes a new instance of the FastGaussianDistributionF class.
Public methodFastGaussianDistributionF(Single, Single)
Initializes a new instance of the FastGaussianDistributionF class.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodNext
Gets a new random value for the underlying probability distribution.
(Overrides DistributionTNext(Random).)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
Remarks

Gaussian distribution is also known as Normal distribution.

The random values generated by this class follow only an approximate Gaussian distribution. The distribution curve can be imagined as a typical Gaussian bell curve within +/- 3 standard deviations. All random values lie in the interval [ExpectedValue - 3 * StandardDeviation, ExpectedValue + 3 * StandardDeviation]. No random values outside the +/- 3 standard deviation interval are returned.

This approximation is faster and makes the random values more controllable for game applications. For example, if in a game tree heights are determined using a real Gaussian distribution with an expected value of 10m and a standard deviation of 1m, then most trees will have a height near 10m. But it would also be possible - unlikely but possible - that a tree with height 30m is generated. This would look very odd. Therefore, it is desirable that the created random values do not exceed 3 standard deviations.

See Also