# Angle class Null safety

Represents an angle. The unit used for construction does not matter, as angles internally always use radians. The class is designed to be immutable but provides operators like adding or subtracting, which all create new angles instead of mutating existing ones.

Implemented types
Annotations

## Constructors

Angle.acos()
Create an angle by computing the arc cosine of `c`.
Angle.asin()
Create an angle by computing the arc sine of `c`.
Angle.atan()
Create an angle by computing the arc tangent of `c`.
Angle.atan2(double y, )
Create an angle by computing the arc tangent from `y / x`. This uses the `atan2()` function, therefore there are two separate parameters for the nominator and the denominator. The result is an angle in `]-180°;180°]`. Sample values:
Angle.atanFullTurn(double y, )
Works in the same manner as Angle.atan2, but results in an angle in `[0°, 360°)`. Sample values:
factory
Angle.cartesian(double x, )
Returns an angle in `[0°, 360°)`, pointing to the cartesian coordinate. The `x` axis has angle `0°`, the `y` axis has angle `90°`.
factory
Angle.degrees(double degrees)
Create an angle defined by degrees. One full turn equals 360 degrees.
const
Angle.eighthTurn()
Create an angle defining one eighth turn.
factory
Angle.fromDegrees(double degrees)
const
const
const
Angle.fromTurns(double turns)
const
Angle.fullTurn()
Create an angle defining one full turn.
factory
Create an angle defined by gradians. One full turn equals 400 gradians.
const
Angle.halfTurn()
Create an angle defining one half turn.
factory
Angle.quarterTurn()
Create an angle defining one quarter turn.
factory
const
Angle.thirdTurn()
Create an angle defining one third turn.
factory
Angle.turns(double turns)
Create an angle defined by turns. One full turn equals 1 turn.
const
Angle.zero()
Create a zero angle.
const

## Properties

cos
Compute the cosine of this angle.
degrees
Get the angle in degrees.
hashCode int
The hash code for this object.
normalized
Returns an angle with the some direction, but confined to the interval `[0°, 360°)`.
runtimeType Type
A representation of the runtime type of the object.
sin
Compute the sine of this angle.
tan
Compute the tangent of this angle.
turns
Get the angle in turns.

## Methods

approximately(Angle rhs, double range) bool
Checks if `rhs` is approximately this angle, +/- `range`. `range` must be non-negative.
compareTo(Angle other) int
Compares this object to another object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
ratio(Angle other)
Returns the ratio between two angles.
toString()
Return a string representation of this angle, optimized to be readable. The angle is printed in degrees, and only one decimal digit is included.
override

## Operators

operator *(double scale)
Scale this angle, returning a new angle.
operator +(Angle other)
Accumulate this and `other`, returning a new angle.
operator -(Angle other)
Compute the difference of this to `other`, returning a new angle.
operator /(double scale)
Inverse scale this angle, returning a new angle.
operator <(Angle other) bool
Compares this to `other`.
operator <=(Angle other) bool
Compares this to `other`.
operator ==(covariant Angle rhs) bool
Compares to another angle. Since IEEE 754 floating points are approximations to real numbers, they cannot be really tested for equality.
override
operator >(Angle other) bool
Compares this to `other`.
operator >=(Angle other) bool
Compares this to `other`.
operator unary-()
Negate this angle, returning a new angle.