I've been pondering the best way to handle 'division by zero' with floats, as evidenced in this thread: http://www.blitzbasic.com/Community/posts.php?topic=73503
Im using Blitz3D, but as I guess this isn't a language specific issue, I thought I'd cast the net wider, here.
What code do you use to protect against div by zero?
Is just adding an epsilon to all divisors a really bad idea? (even if you're not concerned with mega-accuracy, and can guarantee there'll be no significant cumulative effect).
Looking at Mark's geom code, the smallest epsilon I should use is .000001, right?
Thanks.
Im using Blitz3D, but as I guess this isn't a language specific issue, I thought I'd cast the net wider, here.
What code do you use to protect against div by zero?
Is just adding an epsilon to all divisors a really bad idea? (even if you're not concerned with mega-accuracy, and can guarantee there'll be no significant cumulative effect).
Looking at Mark's geom code, the smallest epsilon I should use is .000001, right?
Thanks.