LineGeometry

LineGeometry

Types

Functions and constants

public function real.getYOnLine(lineFormular line) returns real

Returns f(x) = m*x + b for a given x value on a line

public function real.getXOnLine(lineFormular line) returns real

Returns the x value for a given y on a line: x = (y - b) / m

public function vec2.getLineFormular(vec2 p) returns lineFormular

Returns the line formula for the line passing through this point and p. WARNING: Undefined behavior for vertical lines (p.x == this.x causes division by zero).

public function lineFormular.getParallelLineWithOrthogonalDistance(real d) returns lineFormular

Returns a parallel line with orthogonal distance d from the original line

public function vec2.getOrthogonalSidePoint(lineFormular line, real d) returns vec2

Returns a point on the side of a line at orthogonal distance d