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

Maintainerdiagrams-discuss@googlegroups.com
Safe HaskellNone

Diagrams.ThreeD.Vector

Contents

Description

Three-dimensional vectors.

Synopsis

Special 2D vectors

unitX :: R3Source

The unit vector in the positive X direction.

unitY :: R3Source

The unit vector in the positive Y direction.

unitZ :: R3Source

The unit vector in the positive Z direction.

unit_X :: R3Source

The unit vector in the negative X direction.

unit_Y :: R3Source

The unit vector in the negative Y direction.

unit_Z :: R3Source

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 :: R3 -> R3 -> AngleSource

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

angleBetweenDirs :: Direction d => d -> d -> AngleSource

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