geometry

package
v0.0.0-...-5daf3a2 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package geometry defines simple types for plane geometry. !+point

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Distance

func Distance(p, q Point) float64

traditional function

Types

type Path

type Path []Point

A Path is a journey connecting the points with straight lines.

func (Path) Distance

func (path Path) Distance() float64

Distance returns the distance traveled along the path.

type Point

type Point struct{ X, Y float64 }

func (Point) Distance

func (p Point) Distance(q Point) float64

same thing, but as a method of the Point type

Jump to

Keyboard shortcuts

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