added a cast to double

Without the cast the intersection is an int division and the result is always zero...