14 : theX0(startingPos), theP0(startingDir.
unit()), thePropDir(propDir), theTolerance(
tolerance) {}
30 if (!eq.hasSolution) {
41 return std::pair<bool, double>(
false, 0.);
54 return std::pair<bool, double>(
true, (fabs(s1) < fabs(s2) ? s1 : s2));
59 return std::pair<bool, double>(
true, ((s1 * propSign > 0) ? s1 : s2));
60 }
else if (s1 * propSign > 0) {
62 return std::pair<bool, double>(
true, (fabs(s1) < fabs(s2) ? s1 : s2));
65 double shorter =
std::min(fabs(s1), fabs(s2));
67 return std::pair<bool, double>(
true, 0);
69 return std::pair<bool, double>(
false, 0.);