Skip to content
  1. API
  2. Ogma
  3. geometry
  4. lines

Ogma.geometry.lines

Ogma static toolbox for dealing with line geometries

ogma.geometry.lines.isPointInLine(px, py, x1, y1, x2, y2, width, margin, isTriangle)

Checks if a point (px, py) is inside a line ((x1, y1), (x2, y2)).

Arguments

  • px number
  • py number
  • x1 number
  • y1 number
  • x2 number
  • y2 number
  • width number Width of the line
  • margin number
  • isTriangle boolean

Returns

  • boolean