
26 Mar
2008
26 Mar
'08
5:52 p.m.
On Wed, 26 Mar 2008, Don Stewart wrote:
jsnow:
-Is there a fast way to cast between Float and Double? I'm using Float currently, and the only reason is because that's what the OpenGL api expects. I'd like to be able to use either representation, but the only way to cast that I've found so far is "float_conv x = fromRational(toRational x)", which is too slow.
I'd try realToFrac, which should be pretty much optimised away.