[SDL] Flickering and division by zero in Windows

Daniel K. O. danielko.listas at gmail.com
Sun Feb 25 07:48:30 PST 2007


Christophe Cavalaria escreveu:
> Lilith Calbridge wrote:
>
>   
>> How would you express infinity in binary?
>>     
>
> Why, by using specific bit patterns that aren't valid FPU values and have
> been declared to mean +infinity and -infinity of course.
>   

Well, C has INFINITY from math.h; but on script languages it may not be
available, so you have to resort on
1.0/0.0; this generates a "Division by Zero exception", and if it's not
trapped, the result is INFINITY.

So I think that either the fp exception is being trapped, or the code is
using integer arithmetic.


---
Daniel K. O.


More information about the SDL mailing list