[Haskell-beginners] Show Floats
johannes.laire at gmail.com
Fri Nov 6 02:39:40 EST 2009
On Fri, Nov 6, 2009 at 9:32 AM, David Virebayre
<dav.vire+haskell at gmail.com> wrote:
> On Fri, Nov 6, 2009 at 6:59 AM, Nathan M. Holden <nathanmholden at gmail.com>
>> Um... well, I solved my own problem.
>> It turns out that my 20-30 minutes of searching for a way to \definecolor
>> terms of 0-255 instead of 0.0-1.0 were just 5 minutes short of finding out
>> way to do it.
>> This is embarrassing.
> If you have this problem again, you can use printf :
There's also Numeric:
Prelude> Numeric.showFFloat (Just 4) 0.001 ""
More information about the Beginners