geometry

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2020 License: GPL-3.0 Imports: 4 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Axis

type Axis int
const (
	X Axis = iota
	Y
	AxisNum
)

type Begin

type Begin struct {
	// contains filtered or unexported fields
}

type BeginEnd

type BeginEnd struct {
	Begin
	End
}

func (BeginEnd) BuildSpan

func (be BeginEnd) BuildSpan() (r Span)

type BeginWidth

type BeginWidth struct {
	Begin
	Width
}

func (BeginWidth) BuildSpan

func (bw BeginWidth) BuildSpan() (r Span)

type End

type End struct {
	// contains filtered or unexported fields
}

type EndWidth

type EndWidth struct {
	End
	Width
}

func (EndWidth) BuildSpan

func (ew EndWidth) BuildSpan() (r Span)

type LatLon

type LatLon struct {
	Lat float64 `json:"lan"`
	Lon float64 `json:"lot"`
}

func (LatLon) Hash

func (ll LatLon) Hash(h hash.Hash)

func (*LatLon) Set

func (ll *LatLon) Set(s string) (err error)

func (LatLon) String

func (ll LatLon) String() string

func (LatLon) ToPoint

func (ll LatLon) ToPoint() (p Point2D)

type LeftRight2D

type LeftRight2D struct {
	Left  Point2D `json:"left"`
	Right Point2D `json:"right"`
}

type MinMax

type MinMax int
const (
	Min MinMax = iota
	Max
	MinMaxNum
)

type MinMaxF64

type MinMaxF64 [MinMaxNum]float64

type MinMaxFloat

type MinMaxFloat struct {
	Min float64 `json:"min"`
	Max float64 `json:"max"`
}

func (MinMaxFloat) Hash

func (m MinMaxFloat) Hash(h hash.Hash)

type Point2D

type Point2D struct {
	X float64 `json:"x"`
	Y float64 `json:"y"`
}

func (Point2D) Hash

func (p Point2D) Hash(h hash.Hash)

func (Point2D) InRectangle

func (p Point2D) InRectangle(r Rectangle) (b bool)

type Rectangle

type Rectangle struct {
	X MinMaxFloat `json:"x"`
	Y MinMaxFloat `json:"y"`
}

func (Rectangle) Contains

func (r Rectangle) Contains(p Point2D) (b bool)

func (Rectangle) Hash

func (r Rectangle) Hash(h hash.Hash)

type Region

type Region struct {
	Min Point2D `json:"min"`
	Max Point2D `json:"max"`
}

func NewRegion

func NewRegion(xmin, xmax, ymin, ymax float64) (r Region)

func (Region) Contains

func (r Region) Contains(p Point2D) (b bool)

func (Region) Hash

func (r Region) Hash(h hash.Hash)

func (Region) Lower

func (r Region) Lower() (lr LeftRight2D)

func (Region) Upper

func (r Region) Upper() (lr LeftRight2D)

type Span

type Span struct {
	Begin
	End
	Width
}

type SpanBuilder

type SpanBuilder interface {
	BuildSpan() Span
}

type Width

type Width struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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