Welcome to Polar for Sphinx, Annotated’s documentation!¶
The polar
Module
-
class
polar.
Polar
(distance: float = 0.0, bearing: float = 0.0)¶ specifies a 2D position or velocity in polar coordinates
This class represents a 2D position or velocity measured in polar coordinates and defined by its distance (or speed) and an angle (bearing) (in radians) from the positive y (‘North’) direction.
We follow the conventions of navigation, not mathematics, so 0 degrees is North and bearings increase in a clockwise fashion.
-
DEGREES_TO_RADIANS
= 0.017453292519943295¶ multiplicative constant to convert degrees to radians
-
RADIANS_TO_DEGREES
= 57.29577951308232¶ multiplicative constant to convert radians to degrees
-
__add__
(other: polar.Polar) → polar.Polar¶ returns the result of adding two Polar
-
__init__
(distance: float = 0.0, bearing: float = 0.0) → None¶ specifies a polar point by distance and bearing
-
__repr__
() → str¶ returns a ‘lossless’ string representation of a PolarCoordinate
-
__weakref__
¶ list of weak references to the object (if defined)
-
rect
() -> (<class 'float'>, <class 'float'>)¶ returns the rectangular (Cartesian) coords as an (x, y) tuple
-