Safe Haskell | None |
---|---|
Language | Haskell2010 |
- class C a where
- toCanonical :: (C real, Bounded int, C int) => int -> real
- fromCanonicalWith :: (C real, Bounded int, C int) => (real -> int) -> real -> int
- fromCanonicalSimpleWith :: (C real, Bounded int, C int) => (real -> int) -> real -> int
- numberOfSignalChannels :: C yv => sig yv -> Int
- int16ToCanonical :: C a => Int16 -> a
- int16FromCanonical :: C a => a -> Int16
- int16FromFloat :: Float -> Int16
- int16FromDouble :: Double -> Int16
Documentation
outputFromCanonical :: (Bounded int, C int, Monoid out) => (int -> out) -> a -> out Source #
numberOfChannels :: a -> Int Source #
fromCanonicalSimpleWith :: (C real, Bounded int, C int) => (real -> int) -> real -> int Source #
Warning:
This may produce negative results for positive input in some cases!
The problem is that (maxBound :: Int32) cannot be represented exactly as Float,
the Float value is actually a bit larger than the Int32 value.
Thus when converting the Float back to Int32 it becomes negative.
Better use fromCanonicalWith
.
numberOfSignalChannels :: C yv => sig yv -> Int Source #
int16ToCanonical :: C a => Int16 -> a Source #
int16FromCanonical :: C a => a -> Int16 Source #
int16FromFloat :: Float -> Int16 Source #
int16FromDouble :: Double -> Int16 Source #