The Range type exposes the following members.
Back to Top
Back to Top
Back to Top
Back to Top
Back to Top
Constructors
Name | Description | |
---|---|---|
Range(Range) | Initializes a new instance of the Range struct.
Copy constructor.
| |
Range(Double, Double) | Initializes a new instance of the Range struct.
|
Methods
Name | Description | |
---|---|---|
Clamp | Clamps the specified value to this range.
That is, the returned value will be within this range.
| |
Contains | Determines whether the specified value is within the range.
| |
Equals |
Compare for equality.
(Overrides ValueType Equals(Object).) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Calculates hash code for a range.
(Overrides ValueType GetHashCode .) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string representation of the range.
(Overrides ValueType ToString .) |
Operators
Name | Description | |
---|---|---|
Equality | Compare for equality.
| |
Inequality | Compare for Inequality.
|
Fields
Name | Description | |
---|---|---|
EmptyRange | Empty range. Both Low and High are 0.
| |
InvalidRange | Invalid range. No operations except IsInvalid are allowed.
| |
UnitRange | Unit range. Low is 0 and High is 1.
|
Properties
Name | Description | |
---|---|---|
High | Gets the high limit of the range.
| |
IsEmptyRange | Gets a value indicating whether the range is empty or not.True
Returns true if the range is an empty (point) interval.
| |
IsUnitRange | Gets a value indicating whether the range is a unit range.
Returns true if the range is a unit range [0, 1].
| |
IsValidRange | Gets a value indicating whether the range is valid or not.
| |
Low | Gets the low limit of the range.
| |
Midpoint | Gets the mid-point of the range. Equal to (Low + High)/2.
| |
Width | Gets the width of the range. Equal to High - Low.
|
See Also