aboutsummaryrefslogtreecommitdiffstats
path: root/src/Vivant/Common.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Vivant/Common.hs')
-rw-r--r--src/Vivant/Common.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Vivant/Common.hs b/src/Vivant/Common.hs
index fd90233..cf017ca 100644
--- a/src/Vivant/Common.hs
+++ b/src/Vivant/Common.hs
@@ -1,5 +1,5 @@
module Vivant.Common
- (vectorSize)
+ (vectorSize, uncurry3)
where
import qualified Data.Vector.Storable as V
@@ -7,3 +7,6 @@ import Foreign.Storable (sizeOf)
vectorSize :: (Num b, V.Storable a) => V.Vector a -> b
vectorSize array = fromIntegral $ V.length array * sizeOf (1.0 :: Float)
+
+uncurry3 :: (t1 -> t2 -> t3 -> t4) -> (t1, t2, t3) -> t4
+uncurry3 f (a, b, c) = f a b c