CalcVectorAngle
double theta1 = CalcVectorAngle(1.0, 0.0, (x1dash - cxdash) / rx,
dtheta = CalcVectorAngle((x1dash - cxdash) / rx,