Module flo_curves::line
source · Expand description
Manipulating and describing lines
While flo_curves
deals mostly with curves, it also supplies a small library of functions for manipulating
lines. The Line
trait can be implemented on other types that define lines, enabling them to be used anywhere
the library needs to perform an operation on a line.
The basic line type is simply a tuple of two points (that is, any tuple of two values of the same type that
implements Coordinate
).
Re-exports
pub use super::geo::*;
Traits
Functions
Determines if a 2D line has intersected a bounding box (and returns the intersection if it exists)
For a two-dimensional line, computes the coefficients of the line equation ax+by+c=0, such that
a^2+b^2 = 1. This normalized form means that
a*x + b*y + c
will return the distance that the
point x
, y
is from the line.For a two-dimensional line, computes the coefficients of the line equation ax+by+c=0
These coefficients are not normalized, which is slightly more efficient than computing the normalized form.
Returns the point at which two lines intersect (if they intersect)
Changes a line to a bezier curve