Examples of subtract()


Examples of org.openpnp.model.Location.subtract()

    Location feedStartLocation = this.feedStartLocation;
    Location feedEndLocation = this.feedEndLocation;
    pickLocation = this.location;
    if (visionOffset != null) {
            feedStartLocation = feedStartLocation.subtract(visionOffset);
            feedEndLocation = feedEndLocation.subtract(visionOffset);
            pickLocation = pickLocation.subtract(visionOffset);
    }
   
    // Move the actuator to the feed start location.
    actuator.moveTo(feedStartLocation.derive(null, null, Double.NaN, Double.NaN), 1.0);
View Full Code Here

Examples of org.osm2world.core.math.VectorXYZ.subtract()

        VectorXYZ backCenter = stepBorderPositions.get(step+1);
       
        double height = abs(frontCenter.y - backCenter.y);
               
        VectorXYZ center = (frontCenter.add(backCenter)).mult(0.5);
        center = center.subtract(Y_UNIT.mult(0.5 * height));
       
        VectorXZ faceDirection = segment.getDirection();
        if (frontCenter.y < backCenter.y) {
          //invert if upwards
          faceDirection = faceDirection.invert();
View Full Code Here

Examples of org.terasology.math.Region3i.subtract()

                    }
                }
            } else {
                Region3i oldRegion = Region3i.createFromCenterExtents(chunkPos, new Vector3i(viewingDistance.x / 2, viewingDistance.y / 2, viewingDistance.z / 2));

                Iterator<Vector3i> chunksForRemove = oldRegion.subtract(viewRegion);
                // remove
                while (chunksForRemove.hasNext()) {
                    Vector3i r = chunksForRemove.next();
                    RenderableChunk c = chunkProvider.getChunk(r);
                    if (c != null) {
View Full Code Here

Examples of pl.com.bottega.ecommerce.sharedkernel.Money.subtract()

    this.quantity = quantity;
    this.discount = discount;
   
    Money discountValue = Money.ZERO;
    if (discount != null)
       discountValue =  discountValue.subtract(discount.getValue());
   
    this.totalCost = productData.getPrice().multiplyBy(quantity).subtract(discountValue);
  }

  public ProductData getProductData() {
View Full Code Here

Examples of ptolemy.actor.util.Time.subtract()

                output.send(0, _newToken);
            } else {
                double valueDifference = ((DoubleToken) _newToken
                        .subtract(_lastToken)).doubleValue();
                double timeDifference = currentTime.subtract(_lastTime)
                        .getDoubleValue();
                double rate = valueDifference / timeDifference;
                double risingRate = ((DoubleToken) risingSlewRate.getToken())
                        .doubleValue();
                double fallingRate = ((DoubleToken) fallingSlewRate.getToken())
View Full Code Here

Examples of ptolemy.data.ScalarToken.subtract()

                        } else {
                            throw new InterpreterException(
                                    "Unknown object types: expected Collection.");
                        }
                    } else {
                        return a.subtract(b);
                    }
                } catch (Exception ex) {
                    throw new FunctionCallException("$sub", args[0], args[1],
                            ex);
                }
View Full Code Here

Examples of ptolemy.math.FixPoint.subtract()

        }
        FixPoint[][] result = fixMatrix();

        for (int i = 0; i < _rowCount; i++) {
            for (int j = 0; j < _columnCount; j++) {
                result[i][j] = scalar.subtract(result[i][j]);
            }
        }

        return new FixMatrixToken(result);
    }
View Full Code Here

Examples of sk.fiit.jim.math.Vector3D.subtract()

    Vector3D one = cartesian(1, 1, 1);
    assertThat(one.add(cartesian(0, 0, 0)), is(equalTo(one)));
    assertThat(one.add(cartesian(1, 0, 0)), is(equalTo(cartesian(2, 1, 1))));
    assertThat(one.multiply(5.0), is(cartesian(5, 5, 5)));
    assertThat(one.divide(0.2), is(equalTo(cartesian(5, 5, 5))));
    assertThat(one.subtract(cartesian(0, 1, 0)), is(equalTo(cartesian(1, 0, 1))));
    assertThat(one.negate(), is(equalTo(cartesian(-1, -1, -1))));
    assertThat(one.addX(1.0), is(equalTo(cartesian(2, 1, 1))));
    assertThat(one.addY(-1.0), is(equalTo(cartesian(1, 0, 1))));
    assertThat(one.addZ(0.0), is(one));
//    original vector should remain the same
View Full Code Here

Examples of weka.experiment.PairedStats.subtract()

    allVar = (full.yStats.stdDev * full.yStats.stdDev);
    allVar = Math.abs(allVar);
    allVar = Math.pow(allVar, (1.0 / order));

    for (i = low + len; i < high - len - 1; i++) {
      rightSubset.subtract(inst.instance(i).value(attr),
         inst.instance(i).value(classIndex));
      leftSubset.add(inst.instance(i).value(attr),
         inst.instance(i).value(classIndex));

      if (!Utils.eq(inst.instance(i + 1).value(attr),
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.