spice-0.4.0.0: An FRP-based game engine written in Haskell.

Safe HaskellNone
LanguageHaskell2010

FRP.Spice.Math

Description

This module re-exports a number of modules having to do with math.

Synopsis

Documentation

data Vector a Source

A datatype that houses two values of a given type. It is provided with a Num instance so that, when used with number types it can function similarly (though not exactly) to a mathematical vector.

Constructors

Vector a a 

Instances

Functor Vector

Maps over both values in the Vector.

Applicative Vector

Applicative instance for Vector.

Num a => Num (Vector a)

Performs operations on the matching fields of the other Vector.

Show a => Show (Vector a)

Displaying the Vector.

Default a => Default (Vector a)

The default for the Vector.

scalar :: Num a => Vector a -> a -> Vector a Source

Multiplying Vector by a scalar value.