421 pmin.
set(-rmax,-rmax);
422 pmax.
set( rmax, rmax);
424 if (std::abs(sinEnd-sinStart) < kCarTolerance &&
425 std::abs(cosEnd-cosStart) < kCarTolerance)
return;
433 G4int icase = (cosEnd < 0) ? 1 : 0;
434 if (sinEnd < 0) icase += 2;
435 if (cosStart < 0) icase += 4;
436 if (sinStart < 0) icase += 8;
442 if (sinEnd < sinStart)
break;
443 pmin.
set(rmin*cosEnd,rmin*sinStart);
444 pmax.
set(rmax*cosStart,rmax*sinEnd );
447 pmin.
set(rmax*cosEnd,
std::min(rmin*sinStart,rmin*sinEnd));
448 pmax.
set(rmax*cosStart,rmax );
451 pmin.
set(-rmax,-rmax);
452 pmax.
set(
std::max(rmax*cosStart,rmax*cosEnd),rmax);
455 pmin.
set(-rmax,rmax*sinEnd);
456 pmax.
set(rmax*cosStart,rmax);
460 pmin.
set(-rmax,-rmax);
461 pmax.
set(rmax,
std::max(rmax*sinStart,rmax*sinEnd));
464 if (sinEnd > sinStart)
break;
465 pmin.
set(rmax*cosEnd,rmin*sinEnd );
466 pmax.
set(rmin*cosStart,rmax*sinStart);
469 pmin.
set(-rmax,-rmax);
470 pmax.
set(rmax*cosEnd,rmax*sinStart);
473 pmin.
set(-rmax,rmax*sinEnd);
474 pmax.
set(
std::max(rmin*cosStart,rmin*cosEnd),rmax*sinStart);
478 pmin.
set(
std::min(rmin*cosStart,rmin*cosEnd),rmax*sinStart);
479 pmax.
set(rmax,rmax*sinEnd);
482 pmin.
set(rmax*cosEnd,rmax*sinStart);
486 if (sinEnd < sinStart)
break;
487 pmin.
set(rmin*cosStart,rmax*sinStart);
488 pmax.
set(rmax*cosEnd,rmin*sinEnd );
491 pmin.
set(-rmax,
std::min(rmax*sinStart,rmax*sinEnd));
496 pmin.
set(rmax*cosStart,-rmax);
497 pmax.
set(rmax,rmax*sinEnd);
500 pmin.
set(
std::min(rmax*cosStart,rmax*cosEnd),-rmax);
504 pmin.
set(rmax*cosStart,-rmax);
505 pmax.
set(rmax*cosEnd,
std::max(rmin*sinStart,rmin*sinEnd));
508 if (sinEnd > sinStart)
break;
509 pmin.
set(rmax*cosStart,rmax*sinEnd);
510 pmax.
set(rmin*cosEnd,rmin*sinStart);
G4double GetSurfaceTolerance() const
void set(double x, double y)
const G4double kCarTolerance
T max(const T t1, const T t2)
brief Return the largest of the two arguments
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
static G4GeometryTolerance * GetInstance()