Looks like you are trying to do a zero length segment query. I think the correct behavior in that case would be to ignore the query altogether. With the way segment queries work, it would be impossible to detect a hit with any shape.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Well, division of a finite floating point number by zero gives you infinity. So yes, it's fine. In fact, Chipmunk uses this in a number of places to deal with infinite masses and such.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
I noticed that the division by zero greatly stall iPhone processor. I had a bug once, an unexplainable lags on iPhone when player is dead. Problem was that maxSpeed of player was zero and it was divisor in some places. So i switched on floating point exceptions to catch such situations and catched problem described above.
Hrm. That's strange, I've never heard of that before. Division by zero to get infinity is the standard floating point behavior. It shouldn't be producing any floating point exceptions, but I guess I'm not totally surprised that it's handled in a way that produces a stall though. Floating division generally already stalls the CPU pipeline on most CPUs.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
It shouldn't be producing any floating point exceptions
As far as i know cpu can call a signal processor to trap a signal. So its your decision does it generate C++ fp exception or not.
If you mean hardware exception, it will be generated on all kind of proccessors i know. Not sure about stall, but armv6 lagging hardly.
Maybe there is a way to control it, i dont know, ARM support suggests to avoid division by zero at all, and offers some ways to trap it.
Strange. Floating point divide by zero is not supposed to be considered exceptional. It seems a bit odd that ARM decided to make it optionally exceptional.