Examples of floatValue()


Examples of com.lowagie.text.pdf.PdfNumber.floatValue()

     * A content operator implementation (Tz).
     */
    private static class SetTextHorizontalScaling implements ContentOperator{
        public void invoke(PdfContentStreamProcessor processor, PdfLiteral operator, ArrayList operands) {
            PdfNumber scale = (PdfNumber)operands.get(0);
            processor.gs().horizontalScaling = scale.floatValue();
        }
    }

    /**
     * A content operator implementation (Tc).
View Full Code Here

Examples of edu.uci.ics.hyracks.data.std.primitive.FloatPointable.floatValue()

                        return;
                    }

                    case ValueTag.XS_FLOAT_TAG: {
                        tvp.getValue(fp);
                        if (fp.floatValue() == 0 || Float.isNaN(fp.floatValue())) {
                            XDMConstants.setFalse(result);
                            return;
                        }
                        XDMConstants.setTrue(result);
                        return;
View Full Code Here

Examples of java.lang.Float.floatValue()

      for(int i=0;i<returned;i++){
    // keep the current sample from the chain
    storedSamples.addElement(new Float(buffer[i]));
    // replace it with a stored sample
    Float tempFloat = (Float)storedSamples.elementAt(storedSamples.size()-1);
    buffer[i] = tempFloat.floatValue();
    // remove the used stored sample
    storedSamples.removeElementAt(storedSamples.size()-1);
      }
     
  } else { // early on pad with silence
View Full Code Here

Examples of java.lang.Number.floatValue()

            n = matchNumber(s.substring(0, s.length()-1));
            s = s.toLowerCase();
            if (s.endsWith("d")) {
                n = n.doubleValue();
            } else if (s.endsWith("f")) {
                n = n.floatValue();
            } else if (s.endsWith("l")) {
                n = n.longValue();
            } else if (s.endsWith("i")) {
                n = n.intValue();
            }
View Full Code Here

Examples of java.math.BigDecimal.floatValue()

        return this;
    }

    public XNumber roundHalfToEven(int precision) {
        final BigDecimal rounded = BigDecimal.valueOf(value).setScale(precision, RoundingMode.HALF_EVEN);
        this.value = rounded.floatValue();
        onUpdate();
        return this;
    }

    @Override
View Full Code Here

Examples of java.math.BigDecimal.floatValue()

        double ang=(double)angle;
        if (ang < 0.0) { ang=maxval+ang; }
        double temp=(ang/maxval)*360.0;
        BigDecimal bd=new BigDecimal(temp);
        BigDecimal result=bd.setScale(2, RoundingMode.HALF_DOWN);
        return result.floatValue();
    }

    /** Convert 4 bytes binary angle to float
     * @param ang   four bytes binary angle
     * @return float value of angle with precision of two decimal in degrees
View Full Code Here

Examples of java.math.BigDecimal.floatValue()

    static float calcAngle(int ang) {
        final double maxval=4294967296.0;
        double temp=(ang/maxval)*360.0;
        BigDecimal bd=new BigDecimal(temp);
        BigDecimal result=bd.setScale(3, RoundingMode.HALF_DOWN);
        return result.floatValue();
    }

    /** Calculate radial elevation of each ray
     * @param angle  two bytes binary angle
     * @return float value of elevation in degrees with precision of two decimal
View Full Code Here

Examples of java.math.BigDecimal.floatValue()

        double ang=(double)angle;
        if (angle < 0) ang=(~angle)+1;
        double temp=(ang/maxval)*360.0;
        BigDecimal bd=new BigDecimal(temp);
        BigDecimal result=bd.setScale(2, RoundingMode.HALF_DOWN);
        return result.floatValue();
    }

    /** Calculate distance between sequential bins in a ray
     * @param range_first  range of first bin in centimeters
     * @param range_last   range of last bin in centimeters
View Full Code Here

Examples of java.math.BigDecimal.floatValue()

     */
    static float calcStep(float range_first, float range_last, short num_bins) {
        float step=(range_last-range_first)/(num_bins-1);
        BigDecimal bd=new BigDecimal(step);
        BigDecimal result=bd.setScale(2, RoundingMode.HALF_DOWN);
        return result.floatValue();
    }

    /** Calculate azimuth of a ray
     * @param az0  azimuth at beginning of ray (binary angle)
     * @param az1  azimuth at end of ray (binary angle)
View Full Code Here

Examples of java.math.BigDecimal.floatValue()

        if ((az0 < 0)&(az1 > 0)) { d=Math.abs(360.0f-azim0)+Math.abs(azim1)}
        double temp=azim0+d*0.5;
        if (temp>360.0) { temp-=360.0; }
        BigDecimal bd=new BigDecimal(temp);
        BigDecimal result=bd.setScale(2, RoundingMode.HALF_DOWN);
        return result.floatValue();
    }

    /** Calculate data values from raw ingest data
     * @param recHdr  java.util.Map object with values for calculation
     * @param dty     type of data ( "Total_Power", "Reflectivity", "Velocity",
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.