Examples of subtract()


Examples of org.bukkit.util.Vector.subtract()

    if (dbefore < 0.0001) {
      return true;
    }
    Vector clonedVelocity = velocity.clone();
    setVectorLengthSquared(clonedVelocity, dbefore);
    return dbefore > clonedVelocity.subtract(offset).lengthSquared();
  }
}
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.ISet.subtract()

  private ISet available(){
    ISet avail = availableSetElements;
    for(int j = 0; j < currentVar; j++){
      if(isSetVar(j)){
        if(varVal[j] != null)
          avail = avail.subtract((ISet)varVal[j]);
      } else {
        if(varVal[j] != null)
          avail = avail.delete(varVal[j]);
      }
    }
View Full Code Here

Examples of org.fenixedu.academic.util.Money.subtract()

            Money installmentAmount =
                    installment.calculateAmount(this.event, this.currentTransactionDate, this.discountPercentage,
                            isToApplyPenalty(this.event, installment));

            if (hasDiscountValue()) {
                installmentAmount = installmentAmount.subtract(this.discountValue);
                this.discountedValue = this.discountValue;
            }

            if (hasMoneyFor(installmentAmount)) {
                this.amount = this.amount.subtract(installmentAmount);
View Full Code Here

Examples of org.geowebcache.diskquota.storage.Quota.subtract()

                            .get(transaction, tileSet.getId(), LockMode.DEFAULT);
                    global = usedQuotaByTileSetId.get(transaction, GLOBAL_QUOTA_NAME,
                            LockMode.DEFAULT);

                    tileSets.delete();
                    global.subtract(freed.getBytes());
                    usedQuotaById.put(transaction, global);
                }
            } finally {
                tileSets.close();
            }
View Full Code Here

Examples of org.h2.value.ValueTime.subtract()

        assertEquals("TIME '11:11:11'", t1.getSQL());
        assertEquals("TIME '11:11:11'", t1.toString());
        assertEquals(1, t1.getSignum());
        assertEquals(-1, t1.negate().getSignum());
        assertEquals(0, t1.multiply(ValueInt.get(0)).getSignum());
        assertEquals(0, t1.subtract(t1).getSignum());
        assertEquals("05:35:35.5", t1.multiply(ValueDouble.get(0.5)).getString());
        assertEquals("22:22:22", t1.divide(ValueDouble.get(0.5)).getString());
        assertEquals("-11:11:11", t1.negate().getString());
        assertEquals("11:11:11", t1.negate().negate().getString());
        assertEquals(Value.TIME, t1.getType());
View Full Code Here

Examples of org.hsqldb.types.IntervalType.subtract()

                    case Tokens.SQL_TSI_FRAC_SECOND :
                        t = Type.SQL_INTERVAL_SECOND_MAX_PRECISION;

                        IntervalSecondData interval =
                            (IntervalSecondData) t.subtract(a, b, null);

                        return new Long(
                            DTIType.limitNanoseconds * interval.getSeconds()
                            + interval.getNanos());

View Full Code Here

Examples of org.hsqldb.types.IntervalType.subtract()

                                        / 7);

                    case Tokens.SQL_TSI_MONTH :
                        t = Type.SQL_INTERVAL_MONTH_MAX_PRECISION;

                        return new Long(t.convertToLong(t.subtract(a, b,
                                null)));

                    case Tokens.SQL_TSI_QUARTER :
                        t = Type.SQL_INTERVAL_MONTH_MAX_PRECISION;
View Full Code Here

Examples of org.hsqldb.types.IntervalType.subtract()

                                null)));

                    case Tokens.SQL_TSI_QUARTER :
                        t = Type.SQL_INTERVAL_MONTH_MAX_PRECISION;

                        return new Long(t.convertToLong(t.subtract(a, b, null))
                                        / 3);

                    case Tokens.SQL_TSI_YEAR :
                        t = Type.SQL_INTERVAL_YEAR_MAX_PRECISION;
View Full Code Here

Examples of org.hsqldb.types.Type.subtract()

                                                Type.SQL_INTEGER);
                        }

                        subType = nodes[0].dataType.getCombinedType(
                            nodes[0].dataType, OpTypes.SUBTRACT);
                        temp = subType.subtract(data[0], data[1],
                                                nodes[0].dataType);
                        temp2 = subType.subtract(data[2], data[1],
                                                 nodes[0].dataType);

                        break;
View Full Code Here

Examples of org.hsqldb_voltpatches.types.IntervalType.subtract()

                    case Tokens.SQL_TSI_FRAC_SECOND :
                        t = Type.SQL_INTERVAL_SECOND_MAX_PRECISION;

                        IntervalSecondData interval =
                            (IntervalSecondData) t.subtract(a, b, null);

                        return new Long(
                            DTIType.limitNanoseconds * interval.getSeconds()
                            + interval.getNanos());

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.