jord-0.2.0.0: Geographical Position Calculations

Copyright (c) 2018 Cedric Liegeois BSD3 Cedric Liegeois experimental portable Safe Haskell2010

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

 Source # Methods(==) :: NVector -> NVector -> Bool #(/=) :: NVector -> NVector -> Bool # Source # MethodsshowList :: [NVector] -> ShowS # Source # Add and subtract NVectors. Methods Source # Identity. Methods

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

Computes the cross product of the two given NVectors.

Computes the dot product of the two given NVectors.

Computes the norm of the given NVector.

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

Normalises the given NVector.

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