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

Copyright(c) 2013 diagrams-lib team (see LICENSE)
LicenseBSD-style (see LICENSE)
Maintainerdiagrams-discuss@googlegroups.com
Safe HaskellNone
LanguageHaskell2010

Diagrams.ThreeD.Vector

Contents

Description

Three-dimensional vectors.

Synopsis

Special 2D vectors

unitX :: R3 Source

The unit vector in the positive X direction.

unitY :: R3 Source

The unit vector in the positive Y direction.

unitZ :: R3 Source

The unit vector in the positive Z direction.

unit_X :: R3 Source

The unit vector in the negative X direction.

unit_Y :: R3 Source

The unit vector in the negative Y direction.

unit_Z :: R3 Source

The unit vector in the negative Z direction.

Converting between vectors and angles

direction :: Direction d => R3 -> d Source

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

fromDirection :: Direction d => d -> R3 Source

fromDirection d is the unit vector in the direction d.

angleBetween :: R3 -> R3 -> Angle Source

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

angleBetweenDirs :: Direction d => d -> d -> Angle Source

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