Unit type for an angle measured in radians.
The T type parameter is the type used to store the angle's value.
It should be a numerical type, preferably Float32 or Float64.
Constructors
full
Amount of radians to complete a full revolution (360 degrees).
Sourcehalf
Amount of radians to complete a half revolution (180 degrees).
Sourcenew(angle : Angle) : self
Creates an angle by converting an existing one to radians.
Sourcenew(value : T)
Creates an angle from the specified value.
Sourcequarter
Amount of radians to complete a quarter of a revolution (90 degrees).
Sourcethird
Amount of radians to complete a third of a revolution (120 degrees).
SourceInstance methods
to_degrees
Converts this angle to degrees.
Sourceto_gradians
Converts this angle to gradians.
Sourceto_radians
Converts this angle to radians.
Simply returns self.
Sourceto_s(io : IO) : Nil
Produces a string containing the angle.
The string is formatted as:
# rad
Sourceto_turns
Converts this angle to turns.
Source