struct Goishi::Point

Defined in:

goishi/data_types/point.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(x : Float64, y : Float64) #

[View source]

Class Method Detail

def self.angle_between(a : Point, b : Point) #

Returns the value of sin sita whose sita is the angle between the vector a and b


[View source]
def self.cross_prod(a : Point, b : Point) #

[View source]
def self.intersection(e : Point, f : Point, g : Point, h : Point, segment : Bool = false) #

Get intersection point of EF and GH. If segment is true, EF and GH are treated as line segments.


[View source]

Instance Method Detail

def *(other : Point) #

[View source]
def *(other : Float64) #

[View source]
def +(other : Point) #

[View source]
def +(other : Float64) #

[View source]
def -(other : Point) #

[View source]
def -(other : Float64) #

[View source]
def /(other : Point) #

[View source]
def /(other : Float64) #

[View source]
def inv #

[View source]
def length : Float64 #

[View source]
def max(a : Float64, b : Float64) #

[View source]
def min(a : Float64, b : Float64) #

[View source]
def unit_vec #

[View source]
def x : Float64 #

[View source]
def y : Float64 #

[View source]