[Haskell-cafe] creating graphics the functional way
Conal Elliott
conal at conal.net
Tue Aug 7 15:17:49 EDT 2007
On 8/5/07, Frank Buss <fb at frank-buss.de> wrote:
> Nearly anything works without thinking too much about the types, but I
> don't like the use of fromInteger in the average and main functions. Is it
> possible that the integers are automaticly converted to floats?
I recommend using Float or Double instead of Int for your point
coordinates. You'll eliminate the need to convert to Float/Double. More
importantly, your whole model will then be resolution independent,
supporting continuous scaling, sub-pixel translation, rotation, etc. See
http://conal.net/Pan for examples & papers.
Cheers, - Conal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20070807/e6b450fa/attachment.htm
More information about the Haskell-Cafe
mailing list