struct S2Cells::LineInterval
- S2Cells::LineInterval
- S2Cells::Interval
- Struct
- Value
- Object
Defined in:
s2_cells/interval.crConstructors
- .from_point_pair(a : Float | Int, b : Float | Int) : LineInterval
- .new(lo : Float | Int = 1.0, hi : Float | Int = 0.0)
Instance Method Summary
- #==(other : LineInterval) : Bool
- #approx_equals?(other : LineInterval, max_error : Float64 = 1e-15) : Bool
- #contains(other : LineInterval | Float | Int) : Bool
- #empty? : Bool
- #expanded(radius : Float | Int) : LineInterval
- #get_center : Float64
- #get_length : Float64
-
#hash : UInt64
Generates an
UInt64
hash value for this object. - #interior_contains(other : LineInterval | Float | Int) : Bool
- #interior_intersects(other : LineInterval) : Bool
- #intersection(other : LineInterval) : LineInterval
- #intersects(other : LineInterval) : Bool
- #union(other : LineInterval) : LineInterval
Instance methods inherited from struct S2Cells::Interval
bound(i : Int) : Float64
bound,
bounds : Tuple(Float64, Float64)
bounds,
hi : Float64
hi,
lo : Float64
lo,
to_s : String
to_s
Constructor methods inherited from struct S2Cells::Interval
empty : Interval
empty,
new(lo : Float | Int, hi : Float | Int)
new
Constructor Detail
Instance Method Detail
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.