Class Interval
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
minfloatThe minimum value of the interval. Default is 0.
maxfloatThe 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
Remarks
Max
Gets or sets the maximum value of the interval.
public float Max { get; set; }
Property Value
Min
Gets or sets the minimum value of the interval.
public float Min { get; set; }
Property Value
Radius
Gets or sets the half-width of the interval.
public float Radius { get; set; }
Property Value
Remarks
Setting this expands or shrinks both ends symmetrically around Center.