Idris2Doc : Geom.Vector

Geom.Vector

(source)

Definitions

solveQuadratic : Double->Double->Double->Maybe (Double, Double)
  Tries to find solutions to the quadratic equation
`ax^2 + bx + c = 0`.

Totality: total
Visibility: export
recordLinearTransformation : Type
  A linear transformation in a two-dimensional vector space
is a sequence of scalings and rotations.

By not using a matrix here we make sure that a transformation
is invertible, without the risk of a division by zero.
This might be a performance issue, but only if we create large
trees of wild mixtures of linear transformations. However,
in a UI we often work with sequences of the same type of
transformations such as a sequence of scalings or a sequence of
rotations. These are merged automatically in the `Semigroup`
implementation.

Totality: total
Visibility: public export
Constructor: 
LT : Scale->Angle->LinearTransformation

Projections:
.rotate : LinearTransformation->Angle
.scale : LinearTransformation->Scale

Hints:
Eq (Vectort)
Interpolation (Vectort)
MonoidLinearTransformation
Ord (Vectort)
SemigroupLinearTransformation
Show (Vectort)
.scale : LinearTransformation->Scale
Totality: total
Visibility: public export
scale : LinearTransformation->Scale
Totality: total
Visibility: public export
.rotate : LinearTransformation->Angle
Totality: total
Visibility: public export
rotate : LinearTransformation->Angle
Totality: total
Visibility: public export
Id : LinearTransformation
  The identity transformation

Totality: total
Visibility: public export
rotation : Angle->LinearTransformation
  A clockwise rotation by the given angle.

Totality: total
Visibility: public export
scaling : Scale->LinearTransformation
  A scaling by the given factor.

Totality: total
Visibility: public export
inverse : LinearTransformation->LinearTransformation
  Computes the inverse of a linear transformation, so
`x <+> inverse x` corresponse to the identity (modulo rounding
errors).

Totality: total
Visibility: export
recordVector : LinearTransformation->Type
  A two-dimensional vector.

Totality: total
Visibility: public export
Constructor: 
V : Double->Double->Vectort

Projections:
.x : Vectort->Double
.y : Vectort->Double

Hints:
Eq (Vectort)
Interpolation (Vectort)
Ord (Vectort)
Show (Vectort)
.x : Vectort->Double
Totality: total
Visibility: public export
x : Vectort->Double
Totality: total
Visibility: public export
.y : Vectort->Double
Totality: total
Visibility: public export
y : Vectort->Double
Totality: total
Visibility: public export
vzero : Vectort
  The zero vector.

Totality: total
Visibility: export
vone : Vectort
  Unity vector along the x axis

Totality: total
Visibility: export
vid : Double->Double->VectorId
  Utility to help with type inference when using vectors in `Id`

Totality: total
Visibility: export
length : Vectort->Double
  Computes the length of a vector.

Totality: total
Visibility: export
(+) : Vectort->Vectort->Vectort
  Vector addition.

Totality: total
Visibility: export
Fixity Declaration: infixl operator, level 8
negate : Negty=>ty->ty
  The underlying of unary minus. `-5` desugars to `negate (fromInteger 5)`.

Totality: total
Visibility: public export
Fixity Declaration: prefix operator, level 10
(-) : Vectort->Vectort->Vectort
  Vector subtraction.

Totality: total
Visibility: export
Fixity Declarations:
infixl operator, level 8
prefix operator, level 10
negate : Vectort->Vectort
  Inverts the given vector by negating its coordinates.

Totality: total
Visibility: export
Fixity Declaration: prefix operator, level 10
scale : Double->Vectort->Vectort
  Multiply a vector with a scalar.

Totality: total
Visibility: export
scaleTo : Double->Vectort->Vectort
  Scales the vector to the given length.

Totality: total
Visibility: export
normalize : Vectort->Vectort
  Normalize a vector to length 1.

Totality: total
Visibility: export
transform : LinearTransformation->Vectort->Vectort
  Apply a linear transformation to a vector

Totality: total
Visibility: export
polar : Scale->Angle->Vectort
  Define a vector by giving its length and its angle

Totality: total
Visibility: export
rotate : Angle->Vectort->Vectort
  Rotate a vector by the specified number of degrees

Totality: total
Visibility: export
angle : Vectort->MaybeAngle
  Tries to calculate the angle of the given vector.
Fails in case this is the zero vector.

Totality: total
Visibility: export
angleOrZero : Vectort->Angle
  Like `angle` but returns `zero` in case the vector is the empty vector.

Totality: total
Visibility: export
perpendicular : Vectort->Vectort
  From a given vector `v` computes a vector perpendicular
to `v` so that `dot v (perpendicular v) === 0.0` (up to rounding
errors).

Totality: total
Visibility: export
dot : Vectort->Vectort->Double
  Computes the dot product of two vectors.

Totality: total
Visibility: export