struct S2Cells::Angle

Included Modules

Defined in:

s2_cells/angle.cr

Constructors

Instance Method Summary

Constructor Detail

def self.from_degrees(degrees : Float64) : Angle #

Creates an Angle from a degree measurement.


[View source]
def self.from_radians(radians : Float64) : Angle #

Creates an Angle from a radians measurement.


[View source]
def self.new(radians : Float64 = 0) #

Initializes a new Angle with a given radians value.


[View source]

Instance Method Detail

def +(other : Angle) : Angle #

Adds two Angles together.


[View source]
def <=>(other : Angle) #

Compares this Angle to another Angle to determine if it is less than the other.


[View source]
def ==(other : Angle) #

Checks equality of the Angle with another object.


[View source]
def degrees : Float64 #

Converts the Angle's radians to degrees.


[View source]
def hash : UInt64 #
Description copied from class Object

Generates an UInt64 hash value for this object.

This method must have the property that a == b implies a.hash == b.hash.

The hash value is used along with #== by the Hash class to determine if two objects reference the same hash key.

Subclasses must not override this method. Instead, they must define hash(hasher), though usually the macro def_hash can be used to generate this method.


[View source]
def radians : Float64 #

Gets the radians value of the Angle.


[View source]
def to_s : String #

Represents the Angle as a string.


[View source]