@Override
  public void compute() {

    // check origin
    if (!((GeoElement) origin).isDefined() || origin.isInfinite()) {
      getQuadric().setUndefined();
      return;
    }

    // check direction
    Coords d = getDirection();

    if (d.equalsForKernel(0, Kernel.STANDARD_PRECISION)) {
      getQuadric().setUndefined();
      return;
    }

    // check number
    double r = getComputer().getNumber(((NumberValue) getNumber()).getDouble());
    if (Double.isNaN(r)) {
      getQuadric().setUndefined();
      return;
    }

    // compute the quadric
    getQuadric().setDefined();
    getComputer().setQuadric(getQuadric(), origin.getInhomCoordsInD(3), d, r);
  }
示例#2
0
  @Override
  public final String toString() {

    // Michael Borcherds 2008-03-30
    // simplified to allow better Chinese translation
    if (algoAnglePoly != null) {
      return app.getPlain(
          "AngleBetweenABCofD",
          An.getLabel(),
          Bn.getLabel(),
          Cn.getLabel(),
          algoAnglePoly.getPolygon().getNameDescription());
    }
    return app.getPlain("AngleBetweenABC", An.getLabel(), Bn.getLabel(), Cn.getLabel());
  }
示例#3
0
 @Override
 public String toString() {
   // Michael Borcherds 2008-03-30
   // simplified to allow better Chinese translation
   return app.getPlain("IncircleOfTriangleABC", A.getLabel(), B.getLabel(), C.getLabel());
 }
示例#4
0
 @Override
 public void compute() {
   pi.updateCoords2D();
   result.setValue(region.isInRegion(pi.getX2D(), pi.getY2D()));
 }
示例#5
0
 public AlgoAnglePoints copy() {
   return new AlgoAnglePoints(An.copy(), Bn.copy(), Cn.copy());
 }
 public String toString() {
   return app.getPlain("PlaneThroughAParallelToB", point.getLabel(), getSecondInput().getLabel());
 }