fixed-0.2.1.1: Signed 15.16 precision fixed point arithmetic

Copyright(C) 2014-15 Edward Kmett
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell98

Numeric.Fixed

Description

Fixed precision arithmetic. This format is the same format used by OpenGL ES 1's GLfixed data type:

One sign bit, 15 bits to the left of the decimal place and 16 bits to the right packed into a 32-bit integer.

Synopsis

Documentation

fromFixed :: Fixed -> Double Source

Convert from a Fixed precision value to a Double

toFixed :: Double -> Fixed Source

Convert from a Double to a Fixed precision value