ValueRange StructureDelta Engine Documentation

Namespace: DeltaEngine.Rendering3D.Particles
Assembly: DeltaEngine.Rendering3D.Particles (in DeltaEngine.Rendering3D.Particles.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public struct ValueRange : Lerp<ValueRange>, 
	Lerp

The ValueRange type exposes the following members.

Constructors

  NameDescription
Public methodValueRange(Single)
Initializes a new instance of the ValueRange class
Public methodValueRange(String)
Initializes a new instance of the ValueRange class
Public methodValueRange(Single, Single)
Initializes a new instance of the ValueRange class
Top
Methods

  NameDescription
Public methodGetRandomValue
Public methodLerp
Public methodToString (Overrides ValueType ToString .)
Top
Properties

  NameDescription
Public propertyEnd
Public propertyStart
Top
Remarks

Tests: DeltaEngine.Rendering3D.Particles.Tests.ValueRangeTests
Examples

6 unit tests call DeltaEngine.Rendering3D.Particles.ValueRange
[Test]
public void SingleValueConstructor()
{
    valueRange = new ValueRange(0.1f);
    Assert.AreEqual(0.1f, valueRange.Start);
    Assert.AreEqual(0.1f, valueRange.End);
}
[Test]
public void MinMaxConstructor()
{
    Assert.AreEqual(0.2f, valueRange.Start);
    Assert.AreEqual(0.3f, valueRange.End);
}
[Test]
public void GetRandomValue()
{
    Randomizer.Use(new FixedRandom(new[] { 0.4f }));
    Assert.AreEqual(0.24f, valueRange.GetRandomValue(), 0.0001f);
}
See Also