]> gitweb.michael.orlitzky.com - spline3.git/commitdiff
src/Volumetric.hs: add type annotations to avoid monomorphism warnings.
authorMichael Orlitzky <michael@orlitzky.com>
Tue, 5 Mar 2019 00:33:13 +0000 (19:33 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Tue, 5 Mar 2019 00:33:13 +0000 (19:33 -0500)
src/Volumetric.hs

index 64669fee1a7205f6a41d8cfa4718e4961a10ebf6..2f2819cf502fcfbeac9f84cb568670b62b300afb 100644 (file)
@@ -138,9 +138,9 @@ values_to_colors arr =
     truncate_rgb (r, g, b) =
       (r', g', b')
       where
-        r' = truncate (r * 255)
-        g' = truncate (g * 255)
-        b' = truncate (b * 255)
+        r' = truncate (r * 255) :: Word8
+        g' = truncate (g * 255) :: Word8
+        b' = truncate (b * 255) :: Word8
 
 
 write_values_to_bmp :: FilePath -> Values2D -> IO ()