Documentation ¶
Index ¶
- Constants
- func EpsEqual(f1, f2 float64) bool
- func SortPoints(pts []Point)
- type BinaryGrid
- type BinaryGridRow
- type Point
- func (p Point) Add(q Point) Point
- func (p Point) Between(p1, p2 Point) bool
- func (p Point) DistTo(q Point) float64
- func (p Point) InnerProduct(q Point) float64
- func (p Point) IsMultipleOf(q Point) bool
- func (p Point) IsZero() bool
- func (p Point) LeftAngleTo(q Point) float64
- func (p Point) ManhattenDistTo(q Point) int
- func (p Point) ManhattenNorm() int
- func (p Point) Norm() float64
- func (p Point) RightAngleTo(q Point) float64
- func (p Point) RightAngleToXAxis() float64
- func (p Point) String() string
- func (p Point) Sub(q Point) Point
- type Point3D
Constants ¶
View Source
const ( Set rune = '#' Unset rune = '.' )
Variables ¶
This section is empty.
Functions ¶
func SortPoints ¶
func SortPoints(pts []Point)
Types ¶
type BinaryGrid ¶
type BinaryGrid struct {
// contains filtered or unexported fields
}
func ParseBinaryGrid ¶
func ParseBinaryGrid(s string) (*BinaryGrid, error)
func (*BinaryGrid) IsSet ¶
func (g *BinaryGrid) IsSet(col, row int) bool
func (*BinaryGrid) NumCols ¶
func (g *BinaryGrid) NumCols() int
func (*BinaryGrid) NumRows ¶
func (g *BinaryGrid) NumRows() int
func (*BinaryGrid) SetPoints ¶
func (g *BinaryGrid) SetPoints() []Point
type BinaryGridRow ¶
type BinaryGridRow []bool
type Point ¶
type Point struct {
X, Y int
}
func (Point) InnerProduct ¶
func (Point) IsMultipleOf ¶
func (Point) LeftAngleTo ¶
func (Point) ManhattenDistTo ¶
func (Point) ManhattenNorm ¶
func (Point) RightAngleTo ¶
func (Point) RightAngleToXAxis ¶
Click to show internal directories.
Click to hide internal directories.