Photomechanics API
Photomechanics.Photo3DStudio.Common.Extensions.RandomExtensions Class Reference

Extensions for Random. More...

Static Public Member Functions

static Double NextDouble (this Random random, Double minValue, Double maxValue)
 Convenient NextDouble with min/max parameters. More...
static TElement RandomElement< TElement > (this Random random, IReadOnlyList< TElement > elements)
 Returns random element of an array. More...

Detailed Description

Extensions for Random.

Member Function Documentation

◆ NextDouble()

static Double Photomechanics.Photo3DStudio.Common.Extensions.RandomExtensions.NextDouble ( this Random  random,
Double  minValue,
Double  maxValue 

Convenient NextDouble with min/max parameters.

ArgumentOutOfRangeExceptionOccurs when minValue > maxValue

◆ RandomElement< TElement >()

static TElement Photomechanics.Photo3DStudio.Common.Extensions.RandomExtensions.RandomElement< TElement > ( this Random  random,
IReadOnlyList< TElement >  elements 

Returns random element of an array.