Line

interface Line<V : Vector<V>>(source)

Represents a line in a vector space.

A line is defined by its distance and offset from points in the space, and it can be used to determine the relative position of points with respect to the line.

Parameters

V

The type of vector that defines the space in which the line exists.

Inheritors

Functions

Link copied to clipboard
open operator fun contains(vec: V): Boolean

Check if a point is on this line.

Link copied to clipboard
abstract fun distance(vec: V): Double

Get the distance from a point to this line.

Link copied to clipboard
abstract fun location(vec: V): Location

Determine the location of a point with respect to this line.

Link copied to clipboard
abstract fun offset(vec: V): Double

Get the offset of a point from this line.

Link copied to clipboard
abstract fun reverse(): Line<V>

Reverse the direction of this line.