hmt-0.16: Haskell Music Theory

Safe HaskellSafe
LanguageHaskell98

Music.Theory.Math.Convert

Description

Specialised type conversions, see mk/mk-convert.hs

map int_to_word8 [-1,0,255,256] == [255,0,255,0]
map int_to_word8_maybe [-1,0,255,256] == [Nothing,Just 0,Just 255,Nothing]
map integer_to_int64_maybe [-2 ^ 63 - 1,2 ^ 63] == [Nothing,Nothing]
map integer_to_word64_maybe [2 ^64 - 1,2 ^ 64] == [Just 18446744073709551615,Nothing]
map int16_to_float [-1,0,1] == [-1,0,1]

Synopsis

Documentation

real_to_float :: Real t => t -> Float Source #

Type specialised realToFrac

real_to_double :: Real t => t -> Double Source #

Type specialised realToFrac

word8_to_int :: Word8 -> Int Source #

Type specialised fromIntegral

int8_to_int :: Int8 -> Int Source #

Type specialised fromIntegral

int16_to_int :: Int16 -> Int Source #

Type specialised fromIntegral

int32_to_int :: Int32 -> Int Source #

Type specialised fromIntegral

int64_to_int :: Int64 -> Int Source #

Type specialised fromIntegral

int_to_word8 :: Int -> Word8 Source #

Type specialised fromIntegral

int_to_int8 :: Int -> Int8 Source #

Type specialised fromIntegral

int_to_int16 :: Int -> Int16 Source #

Type specialised fromIntegral

int_to_int32 :: Int -> Int32 Source #

Type specialised fromIntegral

int_to_int64 :: Int -> Int64 Source #

Type specialised fromIntegral

int_to_float :: Int -> Float Source #

Type specialised fromIntegral