Examples of movePointRight()


Examples of java.math.BigDecimal.movePointRight()

    // encode M by peeling off centimal digits, encoding x as 2x+1
    startM = dst.getPosition();
    // TODO: 18 is an arbitrary encoding limit. Reevaluate once we have a better handling of
    // numeric scale.
    for (int i = 0; i < 18 && abs.compareTo(BigDecimal.ZERO) != 0; i++) {
      abs = abs.movePointRight(2);
      d = abs.intValue();
      dst.put((byte) (2 * d + 1));
      abs = abs.subtract(BigDecimal.valueOf(d));
    }

View Full Code Here

Examples of java.math.BigDecimal.movePointRight()

      calendar.add( Calendar.SECOND,  (_seconds == null)
            ? 0 : _seconds.intValue());

      if(_seconds!=null) {
      BigDecimal fraction = _seconds.subtract(_seconds.setScale(0,BigDecimal.ROUND_DOWN));
      int millisec = fraction.movePointRight(3).intValue();
      calendar.add( Calendar.MILLISECOND, millisec );
      }
    }

    private static int parseInt(String value){
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.