struct S2Cells::LineInterval

Defined in:

s2_cells/interval.cr

Constructors

Instance Method Summary

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

def self.from_point_pair(a : Float | Int, b : Float | Int) : LineInterval #

[View source]
def self.new(lo : Float | Int = 1.0, hi : Float | Int = 0.0) #

[View source]

Instance Method Detail

def ==(other : LineInterval) : Bool #

[View source]
def approx_equals?(other : LineInterval, max_error : Float64 = 1e-15) : Bool #

[View source]
def contains(other : LineInterval | Float | Int) : Bool #

[View source]
def empty? : Bool #

[View source]
def expanded(radius : Float | Int) : LineInterval #

[View source]
def get_center : Float64 #

[View source]
def get_length : Float64 #

[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 interior_contains(other : LineInterval | Float | Int) : Bool #

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

[View source]
def intersection(other : LineInterval) : LineInterval #

[View source]
def intersects(other : LineInterval) : Bool #

[View source]
def union(other : LineInterval) : LineInterval #

[View source]