Skip to content

Line

Module Geometry.Lines

In ixfx, a Line is two Points

type Line = {
a: Point
b: Point
}

Once you have that there are a bunch of functions to help you work with circles.

Manipulating

Comparison with other shapes

  • distance - distance from point to nearest point on line
  • nearest -nearest point on line to another point
  • withinRange - returns true if point is within a given range of line

Conversions

Math

Etc

  • isEmpty - Checks if line is empty
  • empty - Returns an empty point