I have several places in my current code (when scaling etc.) where it's possible a division by zero could occur.
Now, Blitz3D throws a division by zero error when using a constant zero (a# = b# / 0.0), but when using a variable as the divisor, B3D seems to handle the situation by returning a value of 'Infinity', and not ending the program with an error.
Is this situation guaranteed when dividing using a variable, or could my program still fail at some point with a division by zero error?
Also, the resultant 'Infinity' value is approximately equivalent to zero, right? I mean, if I scale an entity with it, it becomes invisible.
Anyone set my mind at rest on this as I'd prefer to not have to check for division by zero in-code. :)
Thanks.
Now, Blitz3D throws a division by zero error when using a constant zero (a# = b# / 0.0), but when using a variable as the divisor, B3D seems to handle the situation by returning a value of 'Infinity', and not ending the program with an error.
Is this situation guaranteed when dividing using a variable, or could my program still fail at some point with a division by zero error?
Also, the resultant 'Infinity' value is approximately equivalent to zero, right? I mean, if I scale an entity with it, it becomes invisible.
Anyone set my mind at rest on this as I'd prefer to not have to check for division by zero in-code. :)
Thanks.