jord-0.1.0.0: Geographic position calculations on Great Circles

Copyright(c) 2018 Cedric Liegeois
LicenseBSD3
MaintainerCedric Liegeois <ofmooseandmen@yahoo.fr>
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Data.Geo.Jord.NVector

Description

Types and functions for working with n-vectors.

Synopsis

Documentation

data NVector Source #

Represents a position as the normal vector to the sphere.

Instances
Eq NVector Source # 
Instance details

Defined in Data.Geo.Jord.NVector

Methods

(==) :: NVector -> NVector -> Bool #

(/=) :: NVector -> NVector -> Bool #

Show NVector Source # 
Instance details

Defined in Data.Geo.Jord.NVector

Quantity NVector Source #

Add and subtract NVectors.

Instance details

Defined in Data.Geo.Jord.NVector

Position NVector Source #

Identity.

Instance details

Defined in Data.Geo.Jord.GreatCircle

nvector :: Double -> Double -> Double -> NVector Source #

Smart NVector constructor. The returned NVector is a unit vector.

cross :: NVector -> NVector -> NVector Source #

Computes the cross product of the two given NVectors.

dot :: NVector -> NVector -> Double Source #

Computes the dot product of the two given NVectors.

norm :: NVector -> Double Source #

Computes the norm of the given NVector.

scale :: NVector -> Double -> NVector Source #

Multiplies each component of the given NVector by the given value.

unit :: NVector -> NVector Source #

Normalises the given NVector.

zero :: NVector Source #

0, 0, 0
- not a valid NVector, but can be used as the identity value during reduction.