geometry

package module
v0.0.0-...-0a9a815 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2019 License: GPL-3.0 Imports: 1 Imported by: 5 modules, 5 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

geometry

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Angle

type Angle struct {
	Value float64
}

func AngleFromRadians

func AngleFromRadians(radians float64) Angle

func (Angle) Add

func (a Angle) Add(addition float64) Angle

func (Angle) AddAngle

func (a Angle) AddAngle(addition Angle) Angle

func (Angle) Radians

func (a Angle) Radians() float64

func (Angle) Slope

func (a Angle) Slope() float64

type Line

type Line struct {
	Direction Angle
	Origin    Point
}

func (Line) TrueOrigin

func (l Line) TrueOrigin() Point

type Point

type Point struct {
	X float64
	Y float64
}

func InterceptLineLine

func InterceptLineLine(this Line, other Line) Point

func InterceptRayLine

func InterceptRayLine(this Ray, other Line) Point

func InterceptRayRay

func InterceptRayRay(this Ray, other Ray) Point

func InterceptRaySegment

func InterceptRaySegment(this Ray, other Segment) Point

func (Point) Add

func (this Point) Add(other Point) Point

func (Point) Direction

func (this Point) Direction(other Point) Angle

func (Point) Distance

func (this Point) Distance(other Point) float64

func (Point) Heading

func (this Point) Heading() Angle

func (Point) Inverse

func (this Point) Inverse() Point

func (Point) Magnitude

func (this Point) Magnitude() float64

func (Point) Multiply

func (this Point) Multiply(value float64) Point

func (Point) Translate

func (this Point) Translate(distance float64, direction Angle) Point

type Ray

type Ray struct {
	Line
}

func RayFromPoints

func RayFromPoints(a Point, b Point) Ray

type Segment

type Segment struct {
	Length float64
	Line
}

func IntermitentShapeFromPoints

func IntermitentShapeFromPoints(points []Point) []Segment

func SegmentFromPoints

func SegmentFromPoints(a Point, b Point) Segment

func ShapeFromPoints

func ShapeFromPoints(points []Point) []Segment

func (*Segment) EndPoint

func (this *Segment) EndPoint() Point

Jump to

Keyboard shortcuts

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