struct

S2Cells::Cap

Inherits Struct < Value < Object

Constants

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

Constructors

empty
Source
from_axis_angle(axis : Point, angle : Angle) : Cap
Source
from_axis_area(axis : Point, area : Float64) : Cap
Source
from_axis_height(axis : Point, height : Float64) : Cap
Source
full
Source
new(axis : Point = Point.new(1.0, 0.0, 0.0), height : Float64 = -1.0)
Source

Class methods

get_height_for_angle(radians : Float64) : Float64
Source

Instance methods

add_point(point : Point)
Source
angle
Source
approx_equals(other : Cap, max_error = 1e-14) : Bool
Source
area
Source
axis
Source
complement
Source
contains(other : Cap | Point | Cell) : Bool
Source
expanded(distance : Angle) : Cap
Source
get_cap_bound
Source
get_rect_bound
Source
height
Source
interior_contains(other : Point) : Bool
Source
interior_intersects(other : Cap) : Bool
Source
intersects(other : Cap | Cell, vertices = Array(Point).new(4)) : Bool
Source
is_empty?
Source
is_full?
Source
is_valid?
Source
may_intersect(other : Cell) : Bool
Source