Examples of divide()


Examples of de.tuhrig.thofu.types.LObject.divide()

            n = token.run(environment, token);
          }
          else {

            n = n.divide(token.run(environment, token));
          }
        }

        return n;
      }
View Full Code Here

Examples of edu.cmu.sphinx.fst.semiring.Semiring.divide()

                // keep residual weights to variable forQueue
                ArrayList<Pair<State, Float>> forQueue = new ArrayList<Pair<State, Float>>();
                for (Pair<State, Float> ps : p) {
                    State old = ps.getLeft();
                    Float u = ps.getRight();
                    Float wnewRevert = semiring.divide(semiring.one(), wnew);
                    int numArcs = old.getNumArcs();
                    for (int j = 0; j < numArcs; j++) {
                        Arc arc = old.getArc(j);
                        if (label == arc.getIlabel()) {
                            State oldstate = arc.getNextState();
View Full Code Here

Examples of engine.geometry.Vector.divide()

        this.velocity = new Vector(0, 0);
    }

    public final void applyImpulse(final Vector impulse) {
        Vector deltaVelocity = new Vector(impulse);
        deltaVelocity.divide(mass);
        velocity.add(deltaVelocity);
    }
   
    public final void addVelocity(final Vector deltaVelocity) {
        velocity.add(deltaVelocity);
View Full Code Here

Examples of erjang.ENumber.divide()

  @BIF(name = "/", type = Type.GUARD)
  static public ENumber divide$p(EObject v1, double d2) {
    ENumber n1;
    if (d2 != 0.0 && (n1 = v1.testNumber()) != null) {
      return n1.divide(d2);
    }
    return null;
  }

  @BIF(name = "/")
View Full Code Here

Examples of gov.nasa.worldwind.geom.Angle.divide()

   static public LatLon s_getMiddle(LatLon llnA, LatLon llnB)
   {
      Angle angAzimuth = LatLon.greatCircleAzimuth(llnA, llnB);
      Angle angAngle = LatLon.greatCircleDistance(llnA, llnB);

      return LatLon.greatCircleEndPosition(llnA, angAzimuth, angAngle.divide(2));
   }
  
   protected GfrLatLon() {}
}
View Full Code Here

Examples of java.math.BigDecimal.divide()

        count++;
      }
    }
    if (count > 0)
    {
      return total.divide(new BigDecimal(String.valueOf(count)), scale, roundingMode);
    }
    return ZERO;
  }

  /**
 
View Full Code Here

Examples of java.math.BigDecimal.divide()

      else {
        CurrencyConvVO convVO = null;
        for(int i=0;i<frame.getCurrConvs().size();i++) {
          convVO = (CurrencyConvVO)frame.getCurrConvs().get(i);
          if (convVO.getCurrencyCode2Reg03REG06().equals(vo.getCurrencyCodeREG03())) {
            vo.setPaymentValueDOC28( res.divide(convVO.getValueREG06(),vo.getDecimalsREG03().intValue(),BigDecimal.ROUND_HALF_UP) );
            break;
          }
        }
      }
    }
View Full Code Here

Examples of java.math.BigDecimal.divide()

              pVO.setPaymentValueDOC28( res );
            else {
              for(int i=0;i<currConvs.size();i++) {
                convVO = (CurrencyConvVO)currConvs.get(i);
                if (convVO.getCurrencyCode2Reg03REG06().equals(vo.getCurrencyCodeReg03DOC19())) {
                  pVO.setPaymentValueDOC28( res.divide(convVO.getValueREG06(),vo.getDecimalsREG03().intValue(),BigDecimal.ROUND_HALF_UP) );
                  break;
                }
              }
            }
          }
View Full Code Here

Examples of java.math.BigDecimal.divide()

    BigDecimal subtotal = controlSubtotal.getBigDecimal();
    BigDecimal discount = controlDiscount.getBigDecimal();
    if (subtotal!=null && discount!=null) {
// no outboxing  must be used, in order to ensure java 1.4 compatibilty
// moreover, the primitive division is not the best choice (do not ensure correct decimals...)
      controlDiscountPerc.setValue( discount.divide(subtotal,5,BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100d)) );
  } else {
      controlDiscountPerc.setValue(null);
    }
  }
View Full Code Here

Examples of java.math.BigDecimal.divide()

        if (values.size() == 1)
          return values.get(0);
        BigDecimal total = new BigDecimal(0);
        for (int i = 0; i < values.size(); ++i)
          total = total.add(BigDecimal.valueOf(values.get(i).doubleValue()));
        return total.divide(BigDecimal.valueOf((long)values.size()), 10, RoundingMode.HALF_EVEN).floatValue();
      case MEDIAN:
        if (values.size() % 2 == 1)
          return values.get(values.size() / 2);
        BigDecimal bd = new BigDecimal(
            values.get(values.size() / 2 - 1));
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.