public boolean timeIntervalContains(double timeToCheck, double EPSILON) { return MathTools.intervalContains(timeToCheck, getInitialTime(), getFinalTime(), EPSILON); }
public boolean timeIntervalContains(double timeToCheck) { return MathTools.intervalContains(timeToCheck, getInitialTime(), getFinalTime(), Epsilons.ONE_MILLIONTH); }
public boolean timeIntervalContains(double timeToCheck, double EPSILON) { return MathTools.intervalContains(timeToCheck, getInitialTime(), getFinalTime(), EPSILON); }
public boolean timeIntervalContains(double timeToCheck) { return MathTools.intervalContains(timeToCheck, getInitialTime(), getFinalTime(), Epsilons.ONE_MILLIONTH); }
/** * Compute every angle of the quadrilateral AND crop the range of the input angle so that the four bar doesn't flip. * @param angleDABInRadians is the angle formed by the sides a and b (see scheme in this class) * @return true if the angle DAB is out of range making the quadrilateral non-convex */ public boolean updateAnglesGivenAngleDAB(double angleDABInRadians) { // Solve angles double A = clamp(angleDABInRadians, minA, maxA); double e = unknownTriangleSideLengthByLawOfCosine(a, b, A); double C = FourbarCalculatorTools.getAngleWithCosineLaw(c, d, e); double angleDBA = FourbarCalculatorTools.getAngleWithCosineLaw(b, e, a); double angleDBC = FourbarCalculatorTools.getAngleWithCosineLaw(c, e, d); double B = angleDBA + angleDBC; double D = 2 * PI - A - B - C; this.angleDAB = A; this.angleABC = B; this.angleBCD = C; this.angleCDA = D; return !MathTools.intervalContains(angleDABInRadians, minA, maxA); }
/** * Given a 3D point in world coordinates, computes whether the point is in this region. * * @param point3dInWorld query expressed in world coordinates. * @param maximumOrthogonalDistance tolerance expressed as maximum orthogonal distance from the * region. * @return true if the point is inside this region, false otherwise. */ public boolean isPointInside(Point3DReadOnly point3dInWorld, double maximumOrthogonalDistance) { Point3D localPoint = new Point3D(); fromWorldToLocalTransform.transform(point3dInWorld, localPoint); if (!MathTools.intervalContains(localPoint.getZ(), maximumOrthogonalDistance)) return false; else return isPointInside(localPoint.getX(), localPoint.getY()); }
double masterJointLimit; if (!MathTools.intervalContains(interiorAngle, 0.0, Math.PI, false, false)) return;
boolean startThisInOther = MathTools.intervalContains(startPercent, 0.0, 1.0); boolean endThisInOther = MathTools.intervalContains(endPercent, 0.0, 1.0); if (startThisInOther && endThisInOther)
public boolean updateAnglesGivenAngleDAB(double angleDABInRadians) { // Solve angles double A = clamp(angleDABInRadians, minA.getDoubleValue(), maxA.getDoubleValue()); double e = unknownTriangleSideLengthByLawOfCosine(lengthAD.getDoubleValue(), lengthBA.getDoubleValue(), A); double C = getAngleWithCosineLaw(lengthCB.getDoubleValue(), lengthDC.getDoubleValue(), e); double angleDBA = getAngleWithCosineLaw(lengthBA.getDoubleValue(), e, lengthAD.getDoubleValue()); double angleDBC = getAngleWithCosineLaw(lengthCB.getDoubleValue(), e, lengthDC.getDoubleValue()); double B = angleDBA + angleDBC; double D = 2 * PI - A - B - C; this.angleDAB = A; this.angleABC = B; this.angleBCD = C; this.angleCDA = D; return !MathTools.intervalContains(angleDABInRadians, minA.getDoubleValue(), maxA.getDoubleValue()); }
double rotationDirection = rejectedNode.getRobotSide().negateIfLeftSide(1.0); while (MathTools.intervalContains(currentRotation, maxRotation) && !newNodeIsValid) rotationDirection = -rotationDirection; while (MathTools.intervalContains(currentRotation, maxRotation) && !newNodeIsValid)