point

package
v0.0.0-...-8fb85de Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseBtw

func CloseBtw(p Point, q Point) bool

func Dist

func Dist(p Point, q Point) (float64, error)

Types

type DimMismatchErr

type DimMismatchErr struct {
	// contains filtered or unexported fields
}

func (DimMismatchErr) Error

func (err DimMismatchErr) Error() string

type DimOutOfRangeErr

type DimOutOfRangeErr struct {
	// contains filtered or unexported fields
}

func (DimOutOfRangeErr) Error

func (err DimOutOfRangeErr) Error() string

type Point

type Point interface {
	Dim() int
	Pr(dim int) (float64, error)
	Norm() float64
}

func Add

func Add(p Point, q Point) (Point, error)

func Diff

func Diff(to Point, from Point) (Point, error)

func Mul

func Mul(p Point, scale float64) Point

func New

func New(coords ...float64) Point

func Origin

func Origin(dim int) Point

Jump to

Keyboard shortcuts

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