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

Represents a range of floating point values. More...

Inheritance diagram for eVision.EFloatRange:
Collaboration diagram for eVision.EFloatRange:

Public Member Functions

 EFloatRange ()
 Creates an EFloatRange.EFloatRange object.
 EFloatRange (float min, float max)
 Creates an EFloatRange.EFloatRange object.
 EFloatRange (eVision.EFloatRange range)
 Creates an EFloatRange.EFloatRange object.
void SetBounds (float min, float max)
 Sets the bounds of the range.
void SetFromBaseAndAbsoluteTolerance (float baseValue, float tolerance)
 Sets the bounds of the range from a base value and an absolute tolerance from this base value.
void SetFromBaseAndRelativeTolerance (float baseValue, float tolerance)
 Sets the bounds of the range from a base value and a relative tolerance from this base value.
void Update (float value)
 Updates the range. If the value passed is outside of the range bounds, they are modified so they include the value.
void Update (eVision.EFloatRange other)
 Updates the range. If the range passed is not fully included in the range bounds, they are modified to include the given range.
bool IsValid ()
 Returns true if the range is defined and valid.
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

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

Detailed Description

Represents a range of floating point values.

License(s): BasicTypes

Constructor & Destructor Documentation

◆ EFloatRange() [1/3]

eVision.EFloatRange.EFloatRange ( )

Creates an EFloatRange.EFloatRange object.

◆ EFloatRange() [2/3]

eVision.EFloatRange.EFloatRange ( float min,
float max )

Creates an EFloatRange.EFloatRange object.

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

◆ EFloatRange() [3/3]

eVision.EFloatRange.EFloatRange ( eVision.EFloatRange range)

Creates an EFloatRange.EFloatRange object.

Parameters
rangeRange to copy.

Member Function Documentation

◆ IsInRange() [1/3]

bool eVision.EFloatRange.IsInRange ( float value)

Checks if a value is inside the range.

Parameters
valueValue to test.

◆ IsInRange() [2/3]

bool eVision.EFloatRange.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/3]

bool eVision.EFloatRange.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).

◆ IsValid()

bool eVision.EFloatRange.IsValid ( )

Returns true if the range is defined and valid.

◆ SetBounds()

void eVision.EFloatRange.SetBounds ( float min,
float max )

Sets the bounds of the range.

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

◆ SetFromBaseAndAbsoluteTolerance()

void eVision.EFloatRange.SetFromBaseAndAbsoluteTolerance ( float baseValue,
float 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.EFloatRange.SetFromBaseAndRelativeTolerance ( float 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() [1/2]

void eVision.EFloatRange.Update ( eVision.EFloatRange other)

Updates the range. If the range passed is not fully included in the range bounds, they are modified to include the given range.

Parameters
otherRange to be included in the range.

◆ Update() [2/2]

void eVision.EFloatRange.Update ( float 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

float eVision.EFloatRange.Center
get

Center of the range.

◆ LowerBound

float eVision.EFloatRange.LowerBound
get

Lower bound of the range.

◆ Size

float eVision.EFloatRange.Size
get

Size of the range.

◆ UpperBound

float eVision.EFloatRange.UpperBound
get

Upper bound of the range.