angle

class guppylang.std.angles.angle[source]

Not an angle in the truest sense but a rotation by a number of half-turns (does not wrap or identify with itself modulo any number of complete turns).

The halfturns field stores the number of half-turns, and float() converts to radians by multiplying by π. The built-in constant pi equals angle(1).

For example, angle(1/2) is equivalent to pi / 2:

angle(1/2) == pi / 2   # True: both represent π/2 radians (90°)
angle(1)   == pi       # True: both represent π radians (180°)
angle(2)   == angle(0) # False: a full turn is not identified with zero
__add__(other: angle) angle[source]
__eq__(other: angle) bool[source]

Return self==value.

__float__() float[source]
__hash__ = None
__mul__(other: float) angle[source]
__neg__() angle[source]
__rmul__(other: float) angle[source]
__rtruediv__(other: float) angle[source]
__sub__(other: angle) angle[source]
__truediv__(other: float) angle[source]
halfturns: float