Returns a random number drawn from a Triangle distribution.
object expression.TriDist (Low], [Middle], [High])
object expression Required. An object expression that evaluates to an object in the Applies To list.
Low Optional Double. The lower bounds of the triangle. Defaults to -1.0
Middle Optional Double. The apex (most-likely) of the triangle. Defaults to 0.0
High Optional Double. The upper bounds of the triangle. Defaults to 1.0
The following example uses the TriDist method for assigning a random value drawn from a Triangle distribution to a CellTag.
Cell.Tags("health").Value = World.Random.TriDist()The following example turns a Bot object by a random angle generated from a triangle distribution. The triangle distribution has a low bound of -15, a most-likely value of 0, and a high bound of 15.
Bot.Turn World.Random.Tridist(-15, 0, 15)