diagrams-lib-1.0.1: Embedded domain-specific language for declarative graphics

Diagrams.ThreeD.Vector

Description

Three-dimensional vectors.

Synopsis

# Special 2D vectors

The unit vector in the positive X direction.

The unit vector in the positive Y direction.

The unit vector in the positive Z direction.

The unit vector in the negative X direction.

The unit vector in the negative Y direction.

The unit vector in the negative Z direction.

# Converting between vectors and angles

direction :: Direction d => R3 -> dSource

`direction v` is the direction in which `v` points. Returns an unspecified value when given the zero vector as input.

fromDirection :: Direction d => d -> R3Source

`fromDirection d` is the unit vector in the direction `d`.

angleBetween :: (Angle a, Num a, Ord a) => R3 -> R3 -> aSource

compute the positive angle between the two vectors in their common plane

angleBetweenDirs :: (Direction d, Angle a, Num a, Ord a) => d -> d -> aSource

compute the positive angle between the two vectors in their common plane