Documentation
¶
Overview ¶
Package geometry implement some basic geometry functions for 2-D points.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DistanceSquared ¶
DistanceSquared returns the square of the Euclidean distance between two points.
Types ¶
type BoundingBox ¶
type BoundingBox struct {
From, To [2]float64
}
A BoundingBox is an axis-aligned bounding box.
func (*BoundingBox) Contains ¶
func (bb *BoundingBox) Contains(p [2]float64) bool
Contains returns true if the point is in the bounding box.
Click to show internal directories.
Click to hide internal directories.