maths

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2017 License: MIT Imports: 2 Imported by: ? modules, 0 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.

Documentation

Overview

Package math contins generic math functions that we need for doing transforms. this package will augment the go math library.

Index

Constants

View Source
const (
	WebMercator = tegola.WebMercator
	WGS84       = tegola.WGS84
	Deg2Rad     = math.Pi / 180
	Rad2Deg     = 180 / math.Pi
	PiDiv2      = math.Pi / 2.0
	PiDiv4      = math.Pi / 4.0
)

Variables

This section is empty.

Functions

func AreaOfPolygon

func AreaOfPolygon(p tegola.Polygon) (area float64)

AreaOfPolygon will calculate the Area of a polygon using the surveyor's formula (https://en.wikipedia.org/wiki/Shoelace_formula)

func DegToRad

func DegToRad(deg float64) float64

func RadToDeg

func RadToDeg(rad float64) float64

Types

This section is empty.

Directories

Path Synopsis
Package webmercator does the translation to and from WebMercator and WGS84 Gotten from: http://wiki.openstreetmap.org/wiki/Mercator#C.23
Package webmercator does the translation to and from WebMercator and WGS84 Gotten from: http://wiki.openstreetmap.org/wiki/Mercator#C.23

Jump to

Keyboard shortcuts

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