geometry

package
v0.0.0-...-6c16969 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeometryDemo

func GeometryDemo(x1 float64, y1 float64, x2 float64, y2 float64)

Types

type ColoredPoint

type ColoredPoint struct {
	Point
	Color color.RGBA
}

type Path

type Path []Point //named slice type

func (Path) Distance

func (path Path) Distance() float64

func (Path) TranslateBy

func (path Path) TranslateBy(offset Point, add bool)

type Point

type Point struct {
	X, Y float64
}

func (Point) Add

func (p Point) Add(q Point) Point

func (*Point) PointDistance

func (p *Point) PointDistance(q Point) float64

func (*Point) ScaleBy

func (p *Point) ScaleBy(factor float64)

func (Point) Sub

func (p Point) Sub(q Point) Point

Jump to

Keyboard shortcuts

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