class documentation

class Angle(FancyEqMixin): (source)

Known subclasses: twisted.positioning.base.Coordinate, twisted.positioning.base.Heading

View In Hierarchy

An object representing an angle.

Class Variable compareAttributes Undocumented
Method __init__ Initializes an angle.
Instance Variable angleType Undocumented
Property inDecimalDegrees The value of this angle in decimal degrees. This value is immutable.
Property inDegreesMinutesSeconds The value of this angle as a degrees, minutes, seconds tuple. This value is immutable.
Method setSign Sets the sign of this angle.
Method __float__ Returns this angle as a float.
Method __repr__ Returns a string representation of this angle.
Class Variable _RANGE_EXPRESSIONS A collection of expressions for the allowable range for the angular value of a particular coordinate value.
Class Variable _ANGLE_TYPE_NAMES English names for angle types.
Instance Variable _angle Undocumented
Property _angleValueRepr Returns a string representation of the angular value of this angle.
Property _angleTypeNameRepr Returns a string representation of the type of this angle.

Inherited from FancyEqMixin:

Method __eq__ Undocumented
Method __ne__ Undocumented
_RANGE_EXPRESSIONS = (source)
A collection of expressions for the allowable range for the angular value of a particular coordinate value.
(type: dict of Angles constants to callables)
_ANGLE_TYPE_NAMES = (source)
English names for angle types.
(type: dict of Angles constants to str)
def __init__(self, angle=None, angleType=None): (source)

Initializes an angle.

ParametersangleThe value of the angle in decimal degrees. (None if unknown). (type: float or None)
angleTypeA symbolic constant describing the angle type. Should be one of Angles or {None} if unknown.
RaisesValueErrorIf the angle type is not the default argument, but it is an unknown type (not in Angle._RANGE_EXPRESSIONS), or it is a known type but the supplied value was out of the allowable range for said type.
angleType = (source)

Undocumented

_angle = (source)

Undocumented

@property
inDecimalDegrees = (source)

The value of this angle in decimal degrees. This value is immutable.

(type: float (or None))
@property
inDegreesMinutesSeconds = (source)

The value of this angle as a degrees, minutes, seconds tuple. This value is immutable.

(type: 3-tuple of int (or None))
def setSign(self, sign): (source)

Sets the sign of this angle.

ParameterssignThe new sign. 1 for positive and -1 for negative signs, respectively. (type: int)
RaisesValueErrorIf the sign parameter is not -1 or 1.
def __float__(self): (source)

Returns this angle as a float.

ReturnsThe float value of this angle, expressed in degrees. (type: float)
def __repr__(self): (source)

Returns a string representation of this angle.

ReturnsThe string representation. (type: str)
@property
_angleValueRepr = (source)

Returns a string representation of the angular value of this angle.

This is a helper function for the actual __repr__.

(type: str)
@property
_angleTypeNameRepr = (source)

Returns a string representation of the type of this angle.

This is a helper function for the actual __repr__.

(type: str)
API Documentation for Twisted, generated by pydoctor 21.2.0 at 2021-02-28 21:00:42.