9 if (min > max) std::swap(min, max);
11 return (value >= min) && (value <= max);
28 return coordIs.withinSorted(x, A_start_x, A_end_x) &&
29 coordIs.withinSorted(y, A_start_y, A_end_y) &&
30 coordIs.withinSorted(x, B_start_x, B_end_x) &&
31 coordIs.withinSorted(y, B_start_y, B_end_y);
Functions to help with numbers.
Provides simple real number checks.
constexpr auto abs(T v)
Returns the absolute value of the argument.
bool PointWithinSegments(double A_start_x, double A_start_y, double A_end_x, double A_end_y, double B_start_x, double B_start_y, double B_end_x, double B_end_y, double x, double y)
Returns whether x and y are within both specified ranges (A and B).
Class for approximate comparisons.
LArSoft utility namespace.
bool ValueInRange(double value, double min, double max)
Returns whether a value is within the specified range.