rachil, yeah it is, I got it from here:
http://lab.polygonal.de/2007/05/10/b...-integer-math/
I can't even pretend that I could work something like that out myself ( btw, lot's of excellent little speed ups on that page ).
I've realised I've got 2 vars defined in the above code I don't need, but I've got another cheeky special case test that I want to try out, and if it works I'll post the whole thing again ( Out of interest, the y2 and x2 vars don't need defining, it can just use y1/x1 ).
Squize.
