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

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

Public Member Functions

None __init__ (self)
 Creates an eVision.EFloatRange.__init__ object.
None __init__ (self, float min, float max)
 Creates an eVision.EFloatRange.__init__ object.
None __init__ (self, eVision.EFloatRange range)
 Creates an eVision.EFloatRange.__init__ object.
None SetBounds (self, float min, float max)
 Sets the bounds of the range.
None SetFromBaseAndAbsoluteTolerance (self, float baseValue, float tolerance)
 Sets the bounds of the range from a base value and an absolute tolerance from this base value.
None SetFromBaseAndRelativeTolerance (self, float baseValue, float tolerance)
 Sets the bounds of the range from a base value and a relative tolerance from this base value.
None Update (self, float value)
 Updates the range.
None Update (self, eVision.EFloatRange other)
 Updates the range.
bool IsValid (self)
 Returns true if the range is defined and valid.
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.
float LowerBound (self)
 Lower bound of the range.
float UpperBound (self)
 Upper bound of the range.
float Center (self)
 Center of the range.
float Size (self)
 Size of the range.

Detailed Description

Represents a range of floating point values.

Remarks:

License(s): BasicTypes

Constructor & Destructor Documentation

◆ __init__() [1/3]

None eVision.EFloatRange.__init__ ( self)

Creates an eVision.EFloatRange.__init__ object.

◆ __init__() [2/3]

None eVision.EFloatRange.__init__ ( self,
float min,
float max )

Creates an eVision.EFloatRange.__init__ object.

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

◆ __init__() [3/3]

None eVision.EFloatRange.__init__ ( self,
eVision.EFloatRange range )

Creates an eVision.EFloatRange.__init__ object.

Parameters
rangeRange to copy.

Member Function Documentation

◆ Center()

float eVision.EFloatRange.Center ( self)

Center of the range.

◆ IsInRange() [1/3]

bool eVision.EFloatRange.IsInRange ( self,
float value )

Checks if a value is inside the range.

Parameters
valueValue to test.

◆ IsInRange() [2/3]

bool eVision.EFloatRange.IsInRange ( self,
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 ( self,
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 ( self)

Returns true if the range is defined and valid.

◆ LowerBound()

float eVision.EFloatRange.LowerBound ( self)

Lower bound of the range.

◆ SetBounds()

None eVision.EFloatRange.SetBounds ( self,
float min,
float max )

Sets the bounds of the range.

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

◆ SetFromBaseAndAbsoluteTolerance()

None eVision.EFloatRange.SetFromBaseAndAbsoluteTolerance ( self,
float baseValue,
float 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).

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

◆ SetFromBaseAndRelativeTolerance()

None eVision.EFloatRange.SetFromBaseAndRelativeTolerance ( self,
float 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)).

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

◆ Size()

float eVision.EFloatRange.Size ( self)

Size of the range.

◆ Update() [1/2]

None eVision.EFloatRange.Update ( self,
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]

None eVision.EFloatRange.Update ( self,
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.

◆ UpperBound()

float eVision.EFloatRange.UpperBound ( self)

Upper bound of the range.