struct

Goishi::Point

Inherits Struct < Value < Object

Constructors

new(x : Float64, y : Float64)
Source

Class methods

angle_between(a : Point, b : Point)

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

Source
cross_prod(a : Point, b : Point)
Source
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.

Source

Instance methods

*(other : Point)
Source
*(other : Float64)
Source
+(other : Point)
Source
+(other : Float64)
Source
-(other : Point)
Source
-(other : Float64)
Source
/(other : Point)
Source
/(other : Float64)
Source
length
Source
max(a : Float64, b : Float64)
Source
min(a : Float64, b : Float64)
Source
unit_vec
Source