struct S2Cells::Cap

Defined in:

s2_cells/cap.cr

Constant Summary

ROUND_UP = 1.0 + (1.0 / (1_u64 << 52))

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.empty : Cap #

[View source]
def self.from_axis_angle(axis : Point, angle : Angle) : Cap #

[View source]
def self.from_axis_area(axis : Point, area : Float64) : Cap #

[View source]
def self.from_axis_height(axis : Point, height : Float64) : Cap #

[View source]
def self.full : Cap #

[View source]
def self.new(axis : Point = Point.new(1.0, 0.0, 0.0), height : Float64 = -1.0) #

[View source]

Class Method Detail

def self.get_height_for_angle(radians : Float64) : Float64 #

[View source]

Instance Method Detail

def add_point(point : Point) #

[View source]
def angle : Angle #

[View source]
def approx_equals(other : Cap, max_error = 1e-14) : Bool #

[View source]
def area : Float64 #

[View source]
def axis : Point #

[View source]
def complement : Cap #

[View source]
def contains(other : Cap | Point | Cell) : Bool #

[View source]
def expanded(distance : Angle) : Cap #

[View source]
def get_cap_bound : Cap #

[View source]
def get_rect_bound : LatLngRect #

[View source]
def height : Float64 #

[View source]
def interior_contains(other : Point) : Bool #

[View source]
def interior_intersects(other : Cap) : Bool #

[View source]
def intersects(other : Cap | Cell, vertices = Array(Point).new(4)) : Bool #

[View source]
def is_empty? : Bool #

[View source]
def is_full? : Bool #

[View source]
def is_valid? : Bool #

[View source]
def may_intersect(other : Cell) : Bool #

[View source]