grid2d

package
v0.0.0-...-07010e4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsInt

func AbsInt(n int) int

Types

type Edge

type Edge struct {
	P1 Pointf
	P2 Pointf
}

func E

func E(p1, p2 Pointf) Edge

func (Edge) Length

func (e Edge) Length() float64

type Point

type Point struct {
	X, Y int
}

func Pt

func Pt(x, y int) Point

func (Point) Add

func (p Point) Add(q Point) Point

func (Point) DistTo

func (p Point) DistTo(q Point) float64

func (Point) InnerProduct

func (p Point) InnerProduct(q Point) float64

func (Point) ManhattenDistTo

func (p Point) ManhattenDistTo(q Point) int

func (Point) ManhattenNorm

func (p Point) ManhattenNorm() int

func (Point) Norm

func (p Point) Norm() float64

func (Point) String

func (p Point) String() string

func (Point) Sub

func (p Point) Sub(q Point) Point

type Pointf

type Pointf struct {
	X, Y float64
}

func Ptf

func Ptf(x, y float64) Pointf

func (Pointf) Add

func (p Pointf) Add(q Pointf) Pointf

func (Pointf) DistTo

func (p Pointf) DistTo(q Pointf) float64

func (Pointf) InnerProduct

func (p Pointf) InnerProduct(q Pointf) float64

func (Pointf) Norm

func (p Pointf) Norm() float64

func (Pointf) String

func (p Pointf) String() string

func (Pointf) Sub

func (p Pointf) Sub(q Pointf) Pointf

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL