Module with useful classes and functions.
TODO: Enhanced version of pygame.Color.
Enhanced list with a cursor attribute
Parameters: |
|
---|
Decrement the cursor and return the new current object.
Parameters: | dec (int) – Number of decrementation of the cursor |
---|
Get the current object.
Increment the cursor and return the new current object.
Parameters: | inc (int) – Number of incrementation of the cursor |
---|
Set the cursor to an arbitrary index value.
Tuple for x,y coordinates and their transformations.
These are all term-to-term operations. Hence, the argument has two be a two-elements iterable. They all return an xytuple.
Also, the absolute value operation is supported (abs). It returned a float corrsponding to the norm of the coordinates.
To apply a specific function on both coordinates, use the method map. It returns an xytuple.
Return a float, the norm of the coordinates.
Add a 2-elements iterable and return an xytuple.
Divide by a 2-elements iterable and return an xytuple.
Add a 2-elements iterable and return an xytuple.
Divide by a 2-elements iterable and return an xytuple.
Product by a 2-elements iterable and return an xytuple.
Substract a 2-elements iterable and return an xytuple.
Product by a 2-elements iterable and return an xytuple.
Return the additive inverse of an xytuple.
Substract a 2-elements iterable and return an xytuple.
Map the coordinates with the given function a return an xytuple.