Examples of subtract()


Examples of com.pointcliki.grid.GridCoordinate.subtract()

  protected void followPath() {
    GridCoordinate xy = fPath.get(fPathIndex);
    fPathIndex++;
   
    xy = xy.subtract(fGrunt.getTile());
    fGrunt.animate("WALK", "WALK", xy);
    fGrunt.movement().move(xy);
    fGrunt.state(GruntState.MOVING);
  }
View Full Code Here

Examples of com.sk89q.craftbook.util.Vector.subtract()

        Vector otherSideBlockPt = pt.add(vertDir.multiply(dist + 2));

        // Check the other side to see if it's built correctly
        if (world.getId(otherSideBlockPt) != type
                || world.getId(otherSideBlockPt.add(sideDir)) != type
                || world.getId(otherSideBlockPt.subtract(sideDir)) != type) {
            throw new InvalidConstructionException(
                    "The other side must be made with the same blocks.");
        }

        if (toOpen) {
View Full Code Here

Examples of com.sk89q.worldedit.Vector.subtract()

        final int index1 = (int) Math.floor(position);

        final Vector position1 = nodes.get(index1).getPosition();
        final Vector position2 = nodes.get(index1 + 1).getPosition();

        return position2.subtract(position1);
    }

    @Override
    public double arcLength(double positionA, double positionB) {
        if (nodes == null)
View Full Code Here

Examples of com.volantis.xml.expression.atomic.temporal.SimpleDateTimeValue.subtract()

        SimpleDateTimeValue first = (SimpleDateTimeValue)
                factory.createDateTimeValue(
                        arguments[0].stringValue().asJavaString());
        DateTimeValue second = factory.createDateTimeValue(
                arguments[1].stringValue().asJavaString());
        return first.subtract(second);
    }

}
View Full Code Here

Examples of com.volantis.xml.expression.atomic.temporal.SimpleDateValue.subtract()

        SimpleDateValue first = (SimpleDateValue)
                factory.createDateValue(
                        arguments[0].stringValue().asJavaString());
        DateValue second = factory.createDateValue(
                arguments[1].stringValue().asJavaString());
        return first.subtract(second);
    }

}
View Full Code Here

Examples of com.volantis.xml.expression.atomic.temporal.SimpleTimeValue.subtract()

        SimpleTimeValue first = (SimpleTimeValue)
                factory.createTimeValue(
                        arguments[0].stringValue().asJavaString());
        TimeValue second = factory.createTimeValue(
                arguments[1].stringValue().asJavaString());
        return first.subtract(second);
    }

}
View Full Code Here

Examples of com.wesabe.api.util.money.Money.subtract()

    @Test
    public void shouldBeOneDollar() throws Exception {
      Money oneDollar = new Money(decimal("1.00"), USD);
      Money twoDollars = new Money(decimal("2.00"), USD);
      assertEquals(oneDollar, twoDollars.subtract(oneDollar));
    }

  }

  public static class One_Dollar_Plus_One_Euro {
View Full Code Here

Examples of de.abg.jreichert.junit4runner.Subtractor.subtract()

public class SubtratorTest extends TestCase {

  public void testSum() {
    Subtractor subtractor = new Subtractor();
    BigDecimal difference = subtractor.subtract(new BigDecimal(7), new BigDecimal(5));
    Assert.assertEquals("expected difference", new BigDecimal(2), difference);
  }
}
View Full Code Here

Examples of de.jungblut.math.DoubleMatrix.subtract()

    DoubleMatrix negativePenalty = negativeOutcome
        .multiplyElementWise(negativeLogHypo);
    DoubleMatrix positivePenalty = inverseOutcome
        .multiplyElementWise(positiveLogHypo);

    return (positivePenalty.subtract(negativePenalty)).sum();
  }

  @Override
  public double calculateError(DoubleVector y, DoubleVector hypothesis) {
View Full Code Here

Examples of de.jungblut.math.DoubleVector.subtract()

    DoubleVector negativeLogHypo = MathUtils.logVector(negativeHypo);
    DoubleVector positiveLogHypo = MathUtils.logVector(hypothesis);
    DoubleVector negativePenalty = negativeOutcome.multiply(negativeLogHypo);
    DoubleVector positivePenalty = inverseOutcome.multiply(positiveLogHypo);

    return (positivePenalty.subtract(negativePenalty)).sum();
  }
}
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.