struct

S2Cells::LineInterval

Inherits S2Cells::Interval < Struct < Value < Object

Constructors

from_point_pair(a : Float | Int, b : Float | Int) : LineInterval
Source
new(lo : Float | Int = 1.0, hi : Float | Int = 0.0)
Source

Instance methods

==(other : LineInterval) : Bool
Source
approx_equals?(other : LineInterval, max_error : Float64 = 1e-15) : Bool
Source
contains(other : LineInterval | Float | Int) : Bool
Source
empty?
Source
expanded(radius : Float | Int) : LineInterval
Source
get_center
Source
get_length
Source
hash

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.

Source
interior_contains(other : LineInterval | Float | Int) : Bool
Source
interior_intersects(other : LineInterval) : Bool
Source
intersection(other : LineInterval) : LineInterval
Source
intersects(other : LineInterval) : Bool
Source
union(other : LineInterval) : LineInterval
Source