Added segment segment intersection and ray segment intersection