geometry

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package geometry defines simply types for plane geometry.

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 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