module Geometric

Extended Modules

Defined in:

geometric/object/circle.cr
geometric/object/vec2.cr
geometric/object/line.cr
geometric/object/polygon.cr
geometric/distance.cr
geometric/intersect.cr
geometric/utility.cr

Instance Method Summary

Instance Method Detail

def angle(a : Vec2, b : Vec2, c : Vec2) #

Calclates the angle of ∠abc


[View source]
def ccw(a : Vec2, b : Vec2, c : Vec2) : Int32 #
   C [+1]
  /

A -- B

  \
   C [-1]

A -- B -- C [+2] A -- C -- B [ 0] B -- A -- C [-2]


[View source]
def distance(v1 : Vec2, v2 : Vec2) : Real #

[View source]
def distance(v : Vec2, c : Circle) : Real #

[View source]
def distance(v : Vec2, l : Line) : Real #

[View source]
def distance(v : Vec2, s : Segment) : Real #

[View source]
def distance(c1 : Circle, c2 : Circle) : Real #

[View source]
def distance(obj1, obj2) : Real #

[View source]
def intersect?(c1 : Circle, c2 : Circle) #

[View source]
def intersect?(l1 : Line, l2 : Line) #

[View source]
def intersect?(s1 : Segment, s2 : Segment) #

[View source]