UniformTimeSpan Struct
A uniform distribution of type System.TimeSpan.
Namespace
RandN.Distributions
Interfaces
Base Types
  • object
  • ValueType
UniformTimeSpan
ValueType
object
IDistribution<TimeSpan>

Syntax

public readonly struct UniformTimeSpan : ValueType, IDistribution<TimeSpan>

Methods

NameReturn ValueSummary
Create(TimeSpan, TimeSpan)UniformTimeSpan
Creates a UniformTimeSpan with an exclusive upper bound. Should not be used directly; instead, use New(TimeSpan, TimeSpan).
static
CreateInclusive(TimeSpan, TimeSpan)UniformTimeSpan
Creates a UniformTimeSpan with an exclusive lower bound. Should not be used directly; instead, use NewInclusive(TimeSpan, TimeSpan).
static
Sample<TRng>(TRng)TimeSpan
Samples a value from rng, blocking until a suitable value is returned.
TrySample<TRng>(TRng, TimeSpan)bool
Attempts to sample a value from rng once, returning false if the value returned is not suitable.