CVBpy 15.0
NumberRange Class Reference

Container for number range definitions. More...

Inherits object.

Public Member Functions

bool contains (self, float value)
 Checks if a value is within the range. More...
 
bool intersects_with (self, cvb.NumberRange other)
 Checks if this value range intersects with another value range. More...
 

Properties

 max = property
 float: Gets or sets the maximum value.
 
 min = property
 float: Gets or sets the minimum value.
 

Detailed Description

Container for number range definitions.

Creates a number range.

Parameters

min : float Minimum value.

max : float Maximum value.

Member Function Documentation

◆ contains()

bool contains (   self,
float  value 
)

Checks if a value is within the range.

Parameters

value : float Value to be checked.

Returns

bool True if the value is within the range (border included), False otherwise.

◆ intersects_with()

bool intersects_with (   self,
cvb.NumberRange  other 
)

Checks if this value range intersects with another value range.

Parameters

other : cvb.NumberRange Range for intersection test.

Returns

bool True if this range and the other range have at least one value in common, False otherwise.