On Fri, 17 Feb 2006 00:49:16 -0500, "Dan Muller" s8ctxw402@sneakemail.com wrote:
My first post to this list...
Hi... :)
Direct3D uses single floats throughout its interface, but in LispWorks for Windows, all floating point types are equivalent to double-float. So I've got this rather difficult situation, where RDNZL can never find a method if it takes a single float argument! Even if it could find it, a down-conversion from double to single float would be needed, which probably shouldn't occur implicitly.
I tried explicitly calling System.Convert.ToSingle, but by the time I can get my hands on the return value, it has been turned back into a double! I haven't been able to figure out a way around this without modifying RDNZL, or writing some sort of .NET function that returned a boxed single. But I'm not sure that the latter wouldn't be unboxed, or that it would give the correct type for the method lookup in RDNZL.
Yeah, tough call. I don't see an easy general solution but for the moment I've uploaded version 0.9.3 which offers the following workaround:
http://weitz.de/rdnzl/#*coerce-double-floats-to-single*
You should be able to (temporarily) rebind this variable to T for single float arguments. Well, UNLESS your .NET method's signature contains both System.Single /and/ System.Double.
Let me know if that helps or if you have a better idea.
Cheers, Edi. _______________________________________________ rdnzl-announce mailing list rdnzl-announce@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/rdnzl-announce