Value¶
This shows all the Value objects and usages.
All of these classes are importable from dofutils.value
Color¶
- class dofutils.value.Color(color1: int, color2: int, color3: int)¶
- property color1: int¶
Return the first color
- Returns:
the first color
- Return type:
int
- property color2: int¶
Return the second color
- Returns:
the second color
- Return type:
int
- property color3: int¶
Return the third color
- Returns:
the third color
- Return type:
int
- colors() list¶
Return a list containing the colors
- Returns:
a list containing the color
- Return type:
list
- static default() Color¶
Return a object color with the default color -1 -1 -1
- Returns:
Return a default color
- Return type:
- hex_color_str(separator: str) str¶
Return a str with the color joined by the separator
- Parameters:
separator – The separator between each color
- Returns:
A string containing the hexadecimal colors
- Return type:
str
- hex_colors() list¶
Return a list containing the colors in a hexadecimal format
- Returns:
a list containing the color
- Return type:
list
Dimension¶
Interval¶
- class dofutils.value.Interval(min: int, max: int)¶
- amplitude() int¶
Return the amplitude of the interval (i.e. max - min)
- Returns:
the amplitude of the interval
- Return type:
int
- average() float¶
Return the average value of the interval (i.e. min + max / 2)
- Returns:
the average of the interval
- Return type:
float
- is_singleton() bool¶
Check if the current interval is a singleton (i.e. min == max)
- Returns:
true if the interval is a singleton, false otherwise
- Return type:
bool
- property max: int¶
Return the current max of the interval
- Returns:
The max of the interval
- Return type:
int
- property min: int¶
Return the current min of the interval
- Returns:
The min of the interval
- Return type:
int
- modify(modifier: int) Interval¶
Modify the end of the interval The returned interval will be [min, max + modifier] If the new end is lower than the min (i.e. -modifier higher than max - min), the interval [min, min] will be returned
- Parameters:
modifier – The modifier value. If positive will increase max, if negative will decrease
- Returns:
The new interval
- Return type:
Value/Constant¶
This shows all the Constant value objects and usages.
All of these classes are importable from dofutils.value.constant