Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
| Subject: | Re: [flasher] Re: Floating point coordinate calculation bug |
| From: | John Dowdell |
| Date: | Wed, 07 Mar 2001 22:41:16 -0000 |
At 1:14 AM 3/7/1, AndyA wrote:
> It would make far more sense for the coordinate system to be
> restricted to integer values surely?
Actually, there's sub-pixel positioning available in the player, which
helps greatly when you zoom in on a file. (The basic unit is a "twip",
which if memory of the SWF SDK is correct, is about 1/2000th of a point.)
When we're laying things out on the screen then floating point rounding
doesn't really matter as much as when doing floating point calculations,
independent of display. (However, if you're in a situation where you're
checking whether something is at a given position, then it's better to
check a slight range, such as with that "if (Math.abs(numA - numB) <
.000001)" phrase.
jd
John Dowdell, Macromedia Tech Support, San Francisco CA US
Search technotes: http://www.macromedia.com/support/search/
Offlist email risks capture by the spam filters. I may not see your
email if it's not on the list. Private one-on-one email options are
available via Priority Access: http://www.macromedia.com/support/
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]

