geometry

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

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

Go to latest
Published: May 11, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package geometry defines simple 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 points with straight lines.

func (Path) Distance

func (path Path) Distance() (sum 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