|
-
February 12th, 2010, 11:06 AM
#6
Re: Ask a question about algorithm
Well, does it seem to work?
Note that incrementing a floating point in a loop like this,
for (double cx = recVertex.x; cx <= recVertex.x + LENGTH; cx += 0.5)
generally should be avoided because small conversion errors tend to be magnified as looping proceeds. It may not cause any harm in this case because the increment 0.5 can be exactly represented in binary but still it's safer to avoid it.
Last edited by nuzzle; February 12th, 2010 at 11:13 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|