realbasic-plugins
[Top] [All Lists]

WIN: How to convert a Fixed type to a double and vice versa?

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: WIN: How to convert a Fixed type to a double and vice versa?
From: Alfred Van Hoek <vanhoek at mac dot com>
Date: Sun, 08 May 2005 09:40:34 -0400
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
The MacOS toolbox provides apis that convert a double to a Fixed and a Fixed
value to a double: X2Fix and Fix2X. I haven't discovered such apis on
windows. Of course it should be possible to implement such a function based
on converting a long to a Fixed value and vice versa:


(value << 16) and (value >> 16)

but not knowing the intricacies of a double on windows, it seems like a long
road by investigating it just by trial and error. Are there some guidelines,
or has someone already figured it and would care to share it?

Thanks in advance,

Alfred

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>