pub fn plot_bresenham_line<F, T, const N: usize>(
start_point: Point<F, N>,
end_point: Point<F, N>,
) -> Vec<Point<T, N>> ⓘ
Expand description
This is a free-form version of the bresenham line-drawing algorithm, allowing for any input, any output, and N dimensions, under the constraints of the function.
§Arguments
start_point
: APoint
of floating typeF
andN
dimensions, representing the starting point of the line.end_point
: APoint
of floating typeF
andN
dimensions, representing the ending point of the line.
§Generics
§Returns
A Vec
of Point
s with inner type T
, representing the drawn line, including the starting point and ending point.
NOTE: The returned Vec
will always go from the starting point to the ending point, regardless of direction in axis.