Exemplo n.º 1
0
bool 
ZoneBox::in_interval (const double point, const Bound& from, const Bound& to)
{
  if (from.type () == Bound::finite
      && point <= from.value ())
    // Point before interval.
    return false;
  if (to.type () == Bound::finite
      && point > to.value ())
    // Point after interval.
    return false;

  // Point in interval.
  return true;
}
Exemplo n.º 2
0
double
VolumeBox::bound_default (const Bound& bound, const double value)
{ return (bound.type () == Bound::finite ? bound.value () : value); }