Documentation ¶
Index ¶
- type Circle
- type Filter
- type Line
- type Lines
- type Point
- func (a Point) Add(x, y float64) Point
- func (a Point) CellCenter() Point
- func (a Point) Closest(ps []Point) *Point
- func (a Point) Compas() Side
- func (a Point) Dir(ptr Pointer) Point
- func (a Point) Dist(ptr Pointer) float64
- func (a Point) Dist2(ptr Pointer) float64
- func (a Point) Floor() Point
- func (a Point) IsCloserThan(dist float64, ptr Pointer) bool
- func (a Point) IsFurtherThan(dist float64, ptr Pointer) bool
- func (a Point) Len() float64
- func (a Point) Manhattan(ptr Pointer) float64
- func (a Point) Mul(x float64) Point
- func (a Point) Neighbours4(offset float64) Points
- func (a Point) Neighbours8(offset float64) Points
- func (a Point) NeighboursDiagonal4(offset float64) Points
- func (a Point) Norm() Point
- func (a Point) Point() Point
- func (a Point) Rotate(rad float64) Point
- func (a *Point) SetX(x float64)
- func (a *Point) SetY(y float64)
- func (a Point) String() string
- func (a Point) To2D() *api.Point2D
- func (a Point) To3D() *api.Point
- func (a Point) Towards(ptr Pointer, offset float64) Point
- func (a Point) X() float64
- func (a Point) Y() float64
- type Pointer
- type Points
- func (ps *Points) Add(p ...Point)
- func (ps Points) Center() Point
- func (ps Points) CloserThan(dist float64, ptr Pointer) Points
- func (ps Points) ClosestTo(ptr Pointer) Point
- func (ps Points) Empty() bool
- func (ps Points) Exists() bool
- func (ps Points) Filter(filters ...Filter) Points
- func (ps Points) FirstFurtherThan(dist float64, from Pointer) Point
- func (ps Points) FurthestTo(ptr Pointer) Point
- func (ps Points) Has(p Point) bool
- func (ps Points) Intersect(ps2 Points) Points
- func (ps Points) Len() int
- func (ps Points) OrderByDistanceTo(ptr Pointer, desc bool)
- func (ps Points) Rect() Points
- func (ps *Points) Remove(point Point)
- type Side
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Point ¶
type Point complex128
func (Point) CellCenter ¶
func (Point) Neighbours4 ¶
func (Point) Neighbours8 ¶
func (Point) NeighboursDiagonal4 ¶
type Points ¶
type Points []Point
func Intersect ¶
Find the intersection of the two circles, the number of intersections may have 0, 1, 2
func (Points) FirstFurtherThan ¶
func (Points) FurthestTo ¶
func (Points) OrderByDistanceTo ¶
type Side ¶
type Side int
Vector directions
func (Side) IsDiagonal ¶
func (Side) IsHorizontal ¶
func (Side) IsOrthogonal ¶
func (Side) IsVertical ¶
Click to show internal directories.
Click to hide internal directories.