trigonometry

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package trigonometry provides helpers to work with trigonometry.

Index

Constants

View Source
const (
	ZeroAngle     = 0.0 // degrees
	RightAngle    = 90.0
	StraightAngle = 180.0
	CompleteAngle = 360.0
)

Variables

This section is empty.

Functions

func DegreeToRadian

func DegreeToRadian(d float64) float64

DegreeToRadian returns angle in radian from given degree d.

func RadianToDegree

func RadianToDegree(r float64) float64

RadianToDegree returns angle in degree from given radian r.

Types

type Angle

type Angle struct {
	Degree float64
	Minute float64
	Second float64
}

Angle represents a DMS angle type.

func DegreeToDMS

func DegreeToDMS(d float64) Angle

DegreeToDMS returns a DMS angle from given degree d.

func RadianToDMS

func RadianToDMS(r float64) Angle

RadianToDMS returns a DMS angle from given radian r.

func (*Angle) DMSToDegree

func (a *Angle) DMSToDegree() float64

DMSToDegree returns angle in degree from the DMS angle.

func (*Angle) DMSToRadian

func (a *Angle) DMSToRadian() float64

DMSToRadian returns angle in radian from the DMS angle.

func (*Angle) IsAcuteAngle

func (a *Angle) IsAcuteAngle() bool

IsAcuteAngle returns true if DMS angle is acute angle.

func (*Angle) IsCompleteAngle

func (a *Angle) IsCompleteAngle() bool

IsCompleteAngle returns true if DMS angle is complete angle.

func (*Angle) IsObtuseAngle

func (a *Angle) IsObtuseAngle() bool

IsObtuseAngle returns true if DMS angle is obtuse angle.

func (*Angle) IsRightAngle

func (a *Angle) IsRightAngle() bool

IsRightAngle returns true if DMS angle is right angle.

Jump to

Keyboard shortcuts

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