Examples of doubleValue()


Examples of org.pdfbox.cos.COSNumber.doubleValue()

        COSNumber y = (COSNumber)arguments.get( 1 );
        COSNumber w = (COSNumber)arguments.get( 2 );
        COSNumber h = (COSNumber)arguments.get( 3 );
        Rectangle2D rect = new Rectangle2D.Double(
            x.doubleValue(),
            drawer.fixY( x.doubleValue(), y.doubleValue())-h.doubleValue(),
            w.doubleValue()+1,
            h.doubleValue()+1);
        drawer.getLinePath().reset();
       
        drawer.getLinePath().append( rect, false );
View Full Code Here

Examples of org.pdfbox.cos.COSNumber.doubleValue()

       
        //append straight line segment from the current point to the point.
        COSNumber x = (COSNumber)arguments.get( 0 );
        COSNumber y = (COSNumber)arguments.get( 1 );
       
        drawer.getLinePath().lineTo( x.floatValue(), (float)drawer.fixY( x.doubleValue(), y.doubleValue()) );
    }
}
View Full Code Here

Examples of org.rococoa.cocoa.foundation.NSNumber.doubleValue()

    @Test public void testReturnTypes() {
        NSNumber e = NSNumber.CLASS.numberWithDouble(Math.E);
        assertEquals(2, e.intValue());
        assertEquals(2, e.longValue());
        assertEquals((float) Math.E, e.floatValue(), 0.001);
        assertEquals(Math.E, e.doubleValue(), 0.001);
    }
   
    @Test public void testPassOCObject() {
        NSNumber fortyTwo = NSNumber.CLASS.numberWithInt(42);   
        NSNumber e = NSNumber.CLASS.numberWithDouble(Math.E);
View Full Code Here

Examples of org.voltdb.client.exampleutils.AppHelper.doubleValue()

            final int poolSize         = apph.intValue("pool-size");
            final String procedure     = apph.stringValue("procedure");
            final long wait            = apph.intValue("wait");
            final long rateLimit       = apph.longValue("ratelimit");
            final boolean autoTune     = apph.booleanValue("autotune");
            final double latencyTarget = apph.doubleValue("latency-target");
            final String csv           = apph.stringValue("stats");
            final boolean runLoader    = apph.booleanValue("run-loader");

            // Validate parameters
            apph.validate("duration", (duration > 0))
View Full Code Here

Examples of org.wsdmdemo.service.weatherStation.impl.TemperatureMetricTypeImpl.doubleValue()

    XmlObject[] tempArry=m_ws.getResourceProperty(weatherStationTempQname);
    if(tempArry.length>0){
      TemperatureMetricTypeImpl x=(TemperatureMetricTypeImpl)tempArry[0];
     
      String value=x.newCursor().getTextValue();
      return new Long(Math.round(x.doubleValue())).intValue();
    }
    return -1;
  }

  public String getPrice() throws FaultException{
View Full Code Here

Examples of ptolemy.data.DoubleToken.doubleValue()

        super.fire();
        if (input.hasToken(0)) {
            DoubleToken inputValue = (DoubleToken)input.get(0);
            double k;
            int M = _backward.length - 1;
            $ASSIGN$_forwardCache(0, inputValue.doubleValue());
            for (int i = 1; i <= M; i++) {
                k = _reflectionCoefs[M - i];
                $ASSIGN$_forwardCache(i, (k * _backwardCache[i]) + _forwardCache[i - 1]);
            }
            output.broadcast(new DoubleToken(_forwardCache[M]));
View Full Code Here

Examples of ptolemy.data.ScalarToken.doubleValue()

                ScalarToken difference = (ScalarToken) leftToken
                        .subtract(rightToken);
                if (((BooleanToken) result).booleanValue()) {
                    _relationType = RelationType.EQUAL_INEQUAL;
                } else {
                    if (difference.doubleValue() < 0) {
                        _relationType = RelationType.LESS_THAN;
                    } else {
                        _relationType = RelationType.GREATER_THAN;
                    }
                }
View Full Code Here

Examples of ptolemy.data.Token.doubleValue()

            // Type of the field must be convertible to double, but
            // need not actually be a double.
            ScalarToken field = (ScalarToken) defaultPropertiesValue
                    .get("range");
            range = field.doubleValue();
        }

        boolean result = (_distanceBetween(source, destination) <= range);

        if (result) {
View Full Code Here

Examples of ptolemy.math.Complex.doubleValue()

                        jjtn002._ptToken = new FloatToken(value.floatValue());
                    } else if (x.endsWith("d") || x.endsWith("p")) {
                        // all floating point numbers are double
                        Double value = new Double(x.substring(0, len - 1));
                        if (x.endsWith("p")) {
                            jjtn002._ptToken = new PetiteToken(value
                                    .doubleValue());
                        } else {
                            jjtn002._ptToken = new DoubleToken(value
                                    .doubleValue());
                        }
View Full Code Here

Examples of ptolemy.math.FixPoint.doubleValue()

            FixToken fixToken = (FixToken) token;
            FixPoint fixValue = fixToken.fixValue();
            List args = new ArrayList(3);

            // Some possible loss of precision?
            args.add(DoubleConstant.v(fixValue.doubleValue()));
            args.add(IntConstant.v(fixValue.getPrecision().getNumberOfBits()));
            args.add(IntConstant.v(fixValue.getPrecision()
                    .getIntegerBitLength()));

            Local tokenLocal = _buildConstantTokenLocal(body, insertPoint,
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.