/** * Determines which of two {@link PrecisionModel}s is the most precise * (allows the greatest number of significant digits). * * @param pm1 a PrecisionModel * @param pm2 a PrecisionModel * @return the PrecisionModel which is most precise */ public static PrecisionModel mostPrecise(PrecisionModel pm1, PrecisionModel pm2) { if (pm1.compareTo(pm2) >= 0) return pm1; return pm2; }
public GeometryGraphOperation(Geometry g0, Geometry g1, BoundaryNodeRule boundaryNodeRule) { // use the most precise model for the result if (g0.getPrecisionModel().compareTo(g1.getPrecisionModel()) >= 0) setComputationPrecision(g0.getPrecisionModel()); else setComputationPrecision(g1.getPrecisionModel()); arg = new GeometryGraph[2]; arg[0] = new GeometryGraph(0, g0, boundaryNodeRule); arg[1] = new GeometryGraph(1, g1, boundaryNodeRule); }
/** * Determines which of two {@link PrecisionModel}s is the most precise * (allows the greatest number of significant digits). * * @param pm1 a PrecisionModel * @param pm2 a PrecisionModel * @return the PrecisionModel which is most precise */ public static PrecisionModel mostPrecise(PrecisionModel pm1, PrecisionModel pm2) { if (pm1.compareTo(pm2) >= 0) return pm1; return pm2; }
public GeometryGraphOperation(Geometry g0, Geometry g1, BoundaryNodeRule boundaryNodeRule) { // use the most precise model for the result if (g0.getPrecisionModel().compareTo(g1.getPrecisionModel()) >= 0) setComputationPrecision(g0.getPrecisionModel()); else setComputationPrecision(g1.getPrecisionModel()); arg = new GeometryGraph[2]; arg[0] = new GeometryGraph(0, g0, boundaryNodeRule); arg[1] = new GeometryGraph(1, g1, boundaryNodeRule); }