public function TestSegment(lambda:Array, normal:b2Vec2, segment:b2Segment, maxLambda:Number):Boolean
Ray cast against this segment with another segment.
Collision Detection in Interactive 3D Environments by Gino van den Bergen
From Section 3.4.1
x = mu1 p1 + mu2 p2
mu1 + mu2 = 1 && mu1 >= 0 && mu2 >= 0
mu1 = 1 - mu2;
x = (1 - mu2) p1 + mu2 p2
= p1 + mu2 (p2 - p1)
x = s + a r (s := start, r := end - start)
s + a r = p1 + mu2 d (d := p2 - p1)
-a r + mu2 d = b (b := s - p1)
[-r d] [a; mu2] = b
Cramer's rule:
denom = det[-r d]
a = det[b d] / denom
mu2 = det[-r b] / denom
Parameters
Returns