Table of Contents

Class Interval

Namespace
Gamelogic.Fx
Assembly
Gamelogic.Fx.dll

Represents an interval of floats.

[Serializable]
public class Interval
Inheritance
Interval
Inherited Members

Remarks

The principal reason for this class is to provide a way to represent an interval in the inspector whcih allows two views to set it: min and max, or center and radius.

Constructors

Interval(float, float)

Initializes a new instance of the Interval class with the specified minimum and maximum values.

public Interval(float min = 0, float max = 1)

Parameters

min float

The minimum value of the interval. Default is 0.

max float

The maximum value of the interval. Default is 1.

Properties

Center

Gets or sets the midpoint of the interval.

public float Center { get; set; }

Property Value

float

Remarks

Setting this shifts both Min and Max while keeping Radius constant.

Max

Gets or sets the maximum value of the interval.

public float Max { get; set; }

Property Value

float

Min

Gets or sets the minimum value of the interval.

public float Min { get; set; }

Property Value

float

Radius

Gets or sets the half-width of the interval.

public float Radius { get; set; }

Property Value

float

Remarks

Setting this expands or shrinks both ends symmetrically around Center.