Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: parsing numbers in QT files



This page seems to give a nice explanation, 2's complement and all:
http://trac.bookofhook.com/bookofhook/trac.cgi/wiki/IntroductionToFixedPointMath

michael


Message: 1 Date: Thu, 05 Jun 2008 15:11:47 -0700 From: email@hidden Subject: parsing numbers in QT files To: email@hidden Message-ID: <email@hidden> Content-Type: text/plain; charset=ISO-8859-1

I'm having trouble recollecting my sophomore year's coursework on bit- level math.

Even after doing some background research on two's complement encoding, I'm still a little stuck. Specifically I'm trying to parse 4 bytes representing "fixed-point numbers divided as 16.16". (And then once that is addressed, also "divided as 2.30".)

Before I beat myself up over this: does anyone have any pointers on this subject? Maybe examples of other code that does this?

(Also I'll want to turn around and encode these values, once I read them correctly... but hopefully if I get a firm grasp on reading I can write them easily enough.)

Regards,

- Jeremy

(This question isn't specifically related to QTJava, but it's related to something I'm writing to replace my dependency on it, so it should still be of interest, right?) :)




_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-java mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-java/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.