Documentation ¶
Overview ¶
Package bresenham provides a generic implementation of Bresenham's Line Algorithm
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Point ¶
type Point[T constraints.Signed] struct { X T Y T }
Point is a generic struct holding two generic coordinates with a constraint of Signed
func Bresenham ¶
func Bresenham[T constraints.Signed](x0, y0, x1, y1 T) []Point[T]
Bresenham requires arguments of any signed type. The line is generated and returned as a slice of Point[T]
Click to show internal directories.
Click to hide internal directories.