| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Hi,
On Mon, 9 May 2005 14:00:00 -0700, Ralph Brunner <email@hidden> wrote:True -- I was just assuming that everybody wants anti-aliased circles :) The simple inside/outside test above is indeed faster if you don't care about AA edges.
float c = ( sqrt ( v.x*v.x + v.y*v.y ) < 300. ? 0. : 1. );
the built-in function distance() is usually faster than using sqrt
What he said plus if you're using the result with a comparison then it's
faster to square (multiply) the other side rather than do the sqrt:
float c = ( ( v.x*v.x + v.y*v.y ) < (300.0f * 300.0f) ? 0.0f : 1.0f );
_______________________________________________ Do not post admin requests to the list. They will be ignored. Quartzcomposer-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quartzcomposer-dev/email@hidden
| References: | |
| >Re: Circle? (From: George Warner <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
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.