Table of Contents

Class FloatGenerator

Namespace
Hegel
Assembly
Hegel.dll

Draws 32-bit floating-point numbers.

public sealed class FloatGenerator : ValueGenerator<float>
Inheritance
FloatGenerator
Inherited Members

Properties

Label

The span label the engine files this generator's draws under. Defaults to a label derived from the class's full name.

public override ulong Label { get; }

Property Value

ulong

Methods

AllowInfinity(bool)

Whether infinities may be drawn (by default, only towards an unbounded side).

public FloatGenerator AllowInfinity(bool allow)

Parameters

allow bool

Returns

FloatGenerator

AllowNan(bool)

Whether NaN may be drawn (by default, only when unbounded).

public FloatGenerator AllowNan(bool allow)

Parameters

allow bool

Returns

FloatGenerator

AllowSubnormal(bool)

Whether subnormal numbers may be drawn (by default, when the range contains them).

public FloatGenerator AllowSubnormal(bool allow)

Parameters

allow bool

Returns

FloatGenerator

DoDraw(TestCase)

Draw one value. Called inside a span labelled Label: draw from another generator through DrawSilent<T>(Generator<T>), which opens its span, rather than by calling its hook.

protected override float DoDraw(TestCase tc)

Parameters

tc TestCase

Returns

float

Max(float)

At most max.

public FloatGenerator Max(float max)

Parameters

max float

Returns

FloatGenerator

MaxExclusive(float)

Less than max.

public FloatGenerator MaxExclusive(float max)

Parameters

max float

Returns

FloatGenerator

Min(float)

At least min.

public FloatGenerator Min(float min)

Parameters

min float

Returns

FloatGenerator

MinExclusive(float)

More than min.

public FloatGenerator MinExclusive(float min)

Parameters

min float

Returns

FloatGenerator