eVision .NET API
Loading...
Searching...
No Matches
eVision.EIntegerRange Class Reference

Represents a range of integer values. More...

Inheritance diagram for eVision.EIntegerRange:
Collaboration diagram for eVision.EIntegerRange:

Public Member Functions

 EIntegerRange ()
 Creates an EIntegerRange.EIntegerRange object.
 EIntegerRange (int min, int max)
 Creates an EIntegerRange.EIntegerRange object.
 EIntegerRange (eVision.EIntegerRange range)
 Creates an EIntegerRange.EIntegerRange object.
void SetBounds (int min, int max)
 Sets the bounds of the range.
void SetFromBaseAndAbsoluteTolerance (int baseValue, int tolerance)
 Sets the bounds of the range from a base value and an absolute tolerance from this base value.
void SetFromBaseAndRelativeTolerance (int baseValue, float tolerance)
 Sets the bounds of the range from a base value and a relative tolerance from this base value.
void Update (int value)
 Updates the range. If the value passed is outside of the range bounds, they are modified so they include the value.
bool IsInRange (int value, bool lowerBoundInclusive, bool upperBoundInclusive)
 Checks if a value is inside the range.
bool IsInRange (int value, bool lowerBoundInclusive)
 Checks if a value is inside the range.
bool IsInRange (int value)
 Checks if a value is inside the range.
bool IsInRange (float value, bool lowerBoundInclusive, bool upperBoundInclusive)
 Checks if a value is inside the range.
bool IsInRange (float value, bool lowerBoundInclusive)
 Checks if a value is inside the range.
bool IsInRange (float value)
 Checks if a value is inside the range.

Properties

int LowerBound [get]
 Lower bound of the range.
int UpperBound [get]
 Upper bound of the range.
int Center [get]
 Center of the range.
int Size [get]
 Size of the range.

Detailed Description

Represents a range of integer values.

License(s): BasicTypes

Constructor & Destructor Documentation

◆ EIntegerRange() [1/3]

eVision.EIntegerRange.EIntegerRange ( )

Creates an EIntegerRange.EIntegerRange object.

◆ EIntegerRange() [2/3]

eVision.EIntegerRange.EIntegerRange ( int min,
int max )

Creates an EIntegerRange.EIntegerRange object.

Parameters
minLower bound of the range.
maxUpper bound of the range.

◆ EIntegerRange() [3/3]

eVision.EIntegerRange.EIntegerRange ( eVision.EIntegerRange range)

Creates an EIntegerRange.EIntegerRange object.

Parameters
rangeRange to copy.

Member Function Documentation

◆ IsInRange() [1/6]

bool eVision.EIntegerRange.IsInRange ( float value)

Checks if a value is inside the range.

Parameters
valueValue to test.

◆ IsInRange() [2/6]

bool eVision.EIntegerRange.IsInRange ( float value,
bool lowerBoundInclusive )

Checks if a value is inside the range.

Parameters
valueValue to test.
lowerBoundInclusiveIndicates if the lower bound should be considered inside the range (true) or outside (false).

◆ IsInRange() [3/6]

bool eVision.EIntegerRange.IsInRange ( float value,
bool lowerBoundInclusive,
bool upperBoundInclusive )

Checks if a value is inside the range.

Parameters
valueValue to test.
lowerBoundInclusiveIndicates if the lower bound should be considered inside the range (true) or outside (false).
upperBoundInclusiveIndicates if the upper bound should be considered inside the range (true) or outside (false).

◆ IsInRange() [4/6]

bool eVision.EIntegerRange.IsInRange ( int value)

Checks if a value is inside the range.

Parameters
valueValue to test.

◆ IsInRange() [5/6]

bool eVision.EIntegerRange.IsInRange ( int value,
bool lowerBoundInclusive )

Checks if a value is inside the range.

Parameters
valueValue to test.
lowerBoundInclusiveIndicates if the lower bound should be considered inside the range (true) or outside (false).

◆ IsInRange() [6/6]

bool eVision.EIntegerRange.IsInRange ( int value,
bool lowerBoundInclusive,
bool upperBoundInclusive )

Checks if a value is inside the range.

Parameters
valueValue to test.
lowerBoundInclusiveIndicates if the lower bound should be considered inside the range (true) or outside (false).
upperBoundInclusiveIndicates if the upper bound should be considered inside the range (true) or outside (false).

◆ SetBounds()

void eVision.EIntegerRange.SetBounds ( int min,
int max )

Sets the bounds of the range.

Parameters
minLower bound of the range.
maxUpper bound of the range.

◆ SetFromBaseAndAbsoluteTolerance()

void eVision.EIntegerRange.SetFromBaseAndAbsoluteTolerance ( int baseValue,
int tolerance )

Sets the bounds of the range from a base value and an absolute tolerance from this base value.

Parameters
baseValueBase value.
toleranceAbsolute tolerance around the base value. Must be positive.

The range will be set with a lower bound of (base - tolerance) and an upper bound of (base + tolerance).

◆ SetFromBaseAndRelativeTolerance()

void eVision.EIntegerRange.SetFromBaseAndRelativeTolerance ( int baseValue,
float tolerance )

Sets the bounds of the range from a base value and a relative tolerance from this base value.

Parameters
baseValueBase value.
toleranceRelative tolerance around the base value. Must be positive.

The range will be set with a lower bound of (base - (base * tolerance)) and an upper bound of (base + (base * tolerance)).

◆ Update()

void eVision.EIntegerRange.Update ( int value)

Updates the range. If the value passed is outside of the range bounds, they are modified so they include the value.

Parameters
valueValue to be included in the range.

Property Documentation

◆ Center

int eVision.EIntegerRange.Center
get

Center of the range.

◆ LowerBound

int eVision.EIntegerRange.LowerBound
get

Lower bound of the range.

◆ Size

int eVision.EIntegerRange.Size
get

Size of the range.

◆ UpperBound

int eVision.EIntegerRange.UpperBound
get

Upper bound of the range.