[prev in list] [next in list] [prev in thread] [next in thread]
List: haskell-cafe
Subject: [Haskell-cafe] Converting from Int to Double
From: Dmitri Pissarenko <mailing-lists () dapissarenko ! com>
Date: 2005-01-26 12:48:17
Message-ID: 20050126134817.dfrgg4ssk8k4sc8g () confixx ! p15142389 ! pureserver ! info
[Download RAW message or body]
Hello!
I have a list of integer numbers (grayscale values from 0 to 255) and want to
convert them to a list of double numbers, so that each number is 0 <= x <= 1,
where 0 is completely black and 1 is completely white.
Before I convert the numbers, I need to convert them to a list of double
values (then I can use map to re-scale each element from 0..255 to 0..1).
How can I convert an Int into a Double?
TIA
Dmitri Pissarenko
--
Dmitri Pissarenko
Software Engineer
http://dapissarenko.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic