| |
- builtins.tuple(builtins.object)
-
- Angle
- Translation
class Angle(builtins.tuple) |
|
Angle(degrees: float, radians: float, sin: float, cos: float)
A definition of angle attributes. |
|
- Method resolution order:
- Angle
- builtins.tuple
- builtins.object
Methods defined here:
- __getnewargs__(self)
- Return self as a plain tuple. Used by copy and pickle.
- __repr__(self)
- Return a nicely formatted representation string
- _asdict(self)
- Return a new dict which maps field names to their values.
- _replace(self, /, **kwds)
- Return a new Angle object replacing specified fields with new values
Class methods defined here:
- _make(iterable) from builtins.type
- Make a new Angle object from a sequence or iterable
Static methods defined here:
- __new__(_cls, degrees: float, radians: float, sin: float, cos: float)
- Create new instance of Angle(degrees, radians, sin, cos)
- from_degrees(val: float) -> 'Angle'
- Create an angle from a degree value.
- from_radians(val: float) -> 'Angle'
- Create an angle from a radian value.
Data descriptors defined here:
- degrees
- Alias for field number 0
- radians
- Alias for field number 1
- sin
- Alias for field number 2
- cos
- Alias for field number 3
Data and other attributes defined here:
- __annotations__ = {'cos': <class 'float'>, 'degrees': <class 'float'>, 'radians': <class 'float'>, 'sin': <class 'float'>}
- __match_args__ = ('degrees', 'radians', 'sin', 'cos')
- __orig_bases__ = (<function NamedTuple>,)
- _field_defaults = {}
- _fields = ('degrees', 'radians', 'sin', 'cos')
Methods inherited from builtins.tuple:
- __add__(self, value, /)
- Return self+value.
- __contains__(self, key, /)
- Return bool(key in self).
- __eq__(self, value, /)
- Return self==value.
- __ge__(self, value, /)
- Return self>=value.
- __getattribute__(self, name, /)
- Return getattr(self, name).
- __getitem__(self, key, /)
- Return self[key].
- __gt__(self, value, /)
- Return self>value.
- __hash__(self, /)
- Return hash(self).
- __iter__(self, /)
- Implement iter(self).
- __le__(self, value, /)
- Return self<=value.
- __len__(self, /)
- Return len(self).
- __lt__(self, value, /)
- Return self<value.
- __mul__(self, value, /)
- Return self*value.
- __ne__(self, value, /)
- Return self!=value.
- __rmul__(self, value, /)
- Return value*self.
- count(self, value, /)
- Return number of occurrences of value.
- index(self, value, start=0, stop=9223372036854775807, /)
- Return first index of value.
Raises ValueError if the value is not present.
Class methods inherited from builtins.tuple:
- __class_getitem__(...) from builtins.type
- See PEP 585
|
class Translation(builtins.tuple) |
|
Translation(dx: float = 0.0, dy: float = 0.0)
A definition of a translation in a Cartesian coordinate system. |
|
- Method resolution order:
- Translation
- builtins.tuple
- builtins.object
Methods defined here:
- __eq__(self, other) -> bool
- Test if two translations are equivalent.
- __getnewargs__(self)
- Return self as a plain tuple. Used by copy and pickle.
- __repr__(self)
- Return a nicely formatted representation string
- _asdict(self)
- Return a new dict which maps field names to their values.
- _replace(self, /, **kwds)
- Return a new Translation object replacing specified fields with new values
- rotate(self, angle: svgen.cartesian.mutate.Angle = Angle(degrees=90.0, radians=1.5707963267948966, sin=1.0, cos=6.123233995736766e-17)) -> 'Translation'
- Rotate this translation vector by some angle.
Class methods defined here:
- _make(iterable) from builtins.type
- Make a new Translation object from a sequence or iterable
Static methods defined here:
- __new__(_cls, dx: float = 0.0, dy: float = 0.0)
- Create new instance of Translation(dx, dy)
- normalize(dx: Union[ForwardRef('Translation'), float], *args, **kwargs) -> 'Translation'
- Normalize input data into a translation.
Data descriptors defined here:
- dx
- Alias for field number 0
- dy
- Alias for field number 1
Data and other attributes defined here:
- __annotations__ = {'dx': <class 'float'>, 'dy': <class 'float'>}
- __match_args__ = ('dx', 'dy')
- __orig_bases__ = (<function NamedTuple>,)
- _field_defaults = {'dx': 0.0, 'dy': 0.0}
- _fields = ('dx', 'dy')
Methods inherited from builtins.tuple:
- __add__(self, value, /)
- Return self+value.
- __contains__(self, key, /)
- Return bool(key in self).
- __ge__(self, value, /)
- Return self>=value.
- __getattribute__(self, name, /)
- Return getattr(self, name).
- __getitem__(self, key, /)
- Return self[key].
- __gt__(self, value, /)
- Return self>value.
- __hash__(self, /)
- Return hash(self).
- __iter__(self, /)
- Implement iter(self).
- __le__(self, value, /)
- Return self<=value.
- __len__(self, /)
- Return len(self).
- __lt__(self, value, /)
- Return self<value.
- __mul__(self, value, /)
- Return self*value.
- __ne__(self, value, /)
- Return self!=value.
- __rmul__(self, value, /)
- Return value*self.
- count(self, value, /)
- Return number of occurrences of value.
- index(self, value, start=0, stop=9223372036854775807, /)
- Return first index of value.
Raises ValueError if the value is not present.
Class methods inherited from builtins.tuple:
- __class_getitem__(...) from builtins.type
- See PEP 585
| |