Represents a range of integer values. More...
Public Member Functions | |
| None | __init__ (self) |
| Creates an eVision.EIntegerRange.__init__ object. | |
| None | __init__ (self, int min, int max) |
| Creates an eVision.EIntegerRange.__init__ object. | |
| None | __init__ (self, eVision.EIntegerRange range) |
| Creates an eVision.EIntegerRange.__init__ object. | |
| None | SetBounds (self, int min, int max) |
| Sets the bounds of the range. | |
| None | SetFromBaseAndAbsoluteTolerance (self, int baseValue, int tolerance) |
| Sets the bounds of the range from a base value and an absolute tolerance from this base value. | |
| None | SetFromBaseAndRelativeTolerance (self, int baseValue, float tolerance) |
| Sets the bounds of the range from a base value and a relative tolerance from this base value. | |
| None | Update (self, int value) |
| Updates the range. | |
| bool | IsInRange (self, float value, bool lowerBoundInclusive, bool upperBoundInclusive) |
| Checks if a value is inside the range. | |
| bool | IsInRange (self, float value, bool lowerBoundInclusive) |
| Checks if a value is inside the range. | |
| bool | IsInRange (self, float value) |
| Checks if a value is inside the range. | |
| int | LowerBound (self) |
| Lower bound of the range. | |
| int | UpperBound (self) |
| Upper bound of the range. | |
| int | Center (self) |
| Center of the range. | |
| int | Size (self) |
| Size of the range. | |
Represents a range of integer values.
Remarks:
License(s): BasicTypes
| None eVision.EIntegerRange.__init__ | ( | self | ) |
Creates an eVision.EIntegerRange.__init__ object.
| None eVision.EIntegerRange.__init__ | ( | self, | |
| int | min, | ||
| int | max ) |
Creates an eVision.EIntegerRange.__init__ object.
| min | Lower bound of the range. |
| max | Upper bound of the range. |
| None eVision.EIntegerRange.__init__ | ( | self, | |
| eVision.EIntegerRange | range ) |
Creates an eVision.EIntegerRange.__init__ object.
| range | Range to copy. |
| int eVision.EIntegerRange.Center | ( | self | ) |
Center of the range.
| bool eVision.EIntegerRange.IsInRange | ( | self, | |
| float | value ) |
Checks if a value is inside the range.
| value | Value to test. |
| bool eVision.EIntegerRange.IsInRange | ( | self, | |
| float | value, | ||
| bool | lowerBoundInclusive ) |
Checks if a value is inside the range.
| value | Value to test. |
| lowerBoundInclusive | Indicates if the lower bound should be considered inside the range (true) or outside (false). |
| bool eVision.EIntegerRange.IsInRange | ( | self, | |
| float | value, | ||
| bool | lowerBoundInclusive, | ||
| bool | upperBoundInclusive ) |
Checks if a value is inside the range.
| value | Value to test. |
| lowerBoundInclusive | Indicates if the lower bound should be considered inside the range (true) or outside (false). |
| upperBoundInclusive | Indicates if the upper bound should be considered inside the range (true) or outside (false). |
| int eVision.EIntegerRange.LowerBound | ( | self | ) |
Lower bound of the range.
| None eVision.EIntegerRange.SetBounds | ( | self, | |
| int | min, | ||
| int | max ) |
Sets the bounds of the range.
| min | Lower bound of the range. |
| max | Upper bound of the range. |
| None eVision.EIntegerRange.SetFromBaseAndAbsoluteTolerance | ( | self, | |
| int | baseValue, | ||
| int | tolerance ) |
Sets the bounds of the range from a base value and an absolute tolerance from this base value.
Remarks:
The range will be set with a lower bound of (base - tolerance) and an upper bound of (base + tolerance).
| baseValue | Base value. |
| tolerance | Absolute tolerance around the base value. Must be positive. |
| None eVision.EIntegerRange.SetFromBaseAndRelativeTolerance | ( | self, | |
| int | baseValue, | ||
| float | tolerance ) |
Sets the bounds of the range from a base value and a relative tolerance from this base value.
Remarks:
The range will be set with a lower bound of (base - (base * tolerance)) and an upper bound of (base + (base * tolerance)).
| baseValue | Base value. |
| tolerance | Relative tolerance around the base value. Must be positive. |
| int eVision.EIntegerRange.Size | ( | self | ) |
Size of the range.
| None eVision.EIntegerRange.Update | ( | self, | |
| int | value ) |
Updates the range.
If the value passed is outside of the range bounds, they are modified so they include the value.
| value | Value to be included in the range. |
| int eVision.EIntegerRange.UpperBound | ( | self | ) |
Upper bound of the range.