coordinates

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: Apache-2.0 Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cartesian

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

* Data structure representing a 2-dimensional vector in Cartesian coordinates. * * Vectors are immutable.

func CreateCartesian

func CreateCartesian(x float64, y float64) Cartesian

* Creates an immutable data structure representing a two-dimensional vector in * Cartesian coordinates.

func (*Cartesian) X

func (this *Cartesian) X() float64

* Returns the abscissa (x-coordinate) of this two-dimensional Cartesian vector.

func (*Cartesian) Y

func (this *Cartesian) Y() float64

* Returns the ordinate (y-coordinate) of this two-dimensional Cartesian vector.

type Geographic

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

* Data structure representing geographic coordinates as longitude and latitude. * * By convention, values are stored in radians. * * Geographic locations are immutable.

func CreateGeographic

func CreateGeographic(longitude float64, latitude float64) Geographic

* Creates an immutable data structure storing geographic coordinates as longitude * and latitude.

func (*Geographic) Latitude

func (this *Geographic) Latitude() float64

* Returns the latitude value of this geographic location. * By convention, this value is in radians.

func (*Geographic) Longitude

func (this *Geographic) Longitude() float64

* Returns the longitude value of this geographic location. * By convention, this value is in radians.

Jump to

Keyboard shortcuts

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