hemisphere

package
v0.0.0-...-f5be08d Latest Latest
Warning

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

Go to latest
Published: May 15, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NorthLabel string = "northern hemisphere"
	SouthLabel string = "southern hemisphere"
)
View Source
const (
	EastLabel string = "eastern hemisphere"
	WestLabel string = "western hemisphere"
)
View Source
const (
	EquatorLabel string = "equator"
	PrimeLabel   string = "prime meridian"
)
View Source
const (
	AntarcticLabel string = "antarctic circle"
	ArcticLabel    string = "arctic circle"
)
View Source
const (
	CancerLabel    string = "tropic of cancer"
	CapricornLabel string = "tropic of capricorn"
)
View Source
const (
	E string = EastLabel
)
View Source
const (
	N string = NorthLabel
)
View Source
const (
	S string = SouthLabel
)
View Source
const (
	W string = WestLabel
)

Variables

View Source
var (
	Antarctic = NewArea(south, ((south + antarctic) / 2), antarctic)
)
View Source
var (
	Arctic = NewArea(north, ((north + arctic) / 2), arctic)
)
View Source
var (
	Cancer = NewArea(arctic-divison, ((cancer + arctic - divison) / 2), cancer)
)
View Source
var (
	Capricorn = NewArea(antarctic+divison, ((capricorn + antarctic + divison) / 2), capricorn)
)
View Source
var (
	Center = &Zone{
		EquatorLabel: Equator,
		PrimeLabel:   Prime}
)
View Source
var (
	East = NewArea(east, (east / 2), prime)
)
View Source
var (
	Eastern = &Zone{
		EastLabel: East}
)
View Source
var (
	Equator = NewArea(cancer-divison, equator, capricorn+divison)
)
View Source
var (
	North = NewArea(north, (north / 2), equator)
)
View Source
var (
	Northern = &Zone{
		ArcticLabel: Arctic,
		CancerLabel: Cancer}
)
View Source
var (
	Prime = NewArea(east/2, prime, west/2)
)
View Source
var (
	South = NewArea(south, (south / 2), equator)
)
View Source
var (
	Southern = &Zone{
		AntarcticLabel: Antarctic,
		CapricornLabel: Capricorn}
)
View Source
var (
	West = NewArea(west, (west / 2), prime)
)
View Source
var (
	Western = &Zone{
		WestLabel: West}
)
View Source
var (
	Zones = (&Zone{}).Concat(
		Center,
		Eastern,
		Northern,
		Southern,
		Western)
)

Functions

This section is empty.

Types

type Area

type Area [3]Coordinate

func NewArea

func NewArea(max, mean, min float32) Area

func (Area) Key

func (area Area) Key() float32

func (Area) Lat

func (area Area) Lat(latitude *latitude.Latitude) Coordinate

type Coordinate

type Coordinate float32

func NewCoordinate

func NewCoordinate(coordinate float32) Coordinate

func NewCoordinateFromLatitude

func NewCoordinateFromLatitude(latitude *latitude.Latitude) Coordinate

func NewCoordinateFromLongtitude

func NewCoordinateFromLongtitude(longtitude *longtitude.Longtitude) Coordinate

func (Coordinate) Absolute

func (coordinate Coordinate) Absolute() float32

func (Coordinate) Less

func (coordinate Coordinate) Less(c Coordinate) bool

func (Coordinate) More

func (coordinate Coordinate) More(c Coordinate) bool

func (Coordinate) Value

func (coordinate Coordinate) Value() float32

type Hemisphere

type Hemisphere struct {
	Latitude   *Latitude
	Longtitude *Longtitude
}

func NewHemisphere

func NewHemisphere(latitude *latitude.Latitude, longtitude *longtitude.Longtitude) *Hemisphere

type Latitude

type Latitude struct {
	Area      *Area
	Name      string
	Reference string
	Y         int
}

func NewLatitude

func NewLatitude(latitude *latitude.Latitude) *Latitude

type Longtitude

type Longtitude struct {
	Area      *Area
	Name      string
	Reference string
	X         int
}

func NewLongtitude

func NewLongtitude(longtitude *longtitude.Longtitude) *Longtitude

type Zone

type Zone map[string]Area

func NewZone

func NewZone(key string, area Area) *Zone

func (*Zone) Add

func (zone *Zone) Add(key string, area Area)

func (*Zone) Concat

func (zone *Zone) Concat(zones ...*Zone) *Zone

func (*Zone) Each

func (zone *Zone) Each(f func(key string, area Area))

Jump to

Keyboard shortcuts

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