Examples of scale()


Examples of gaia.cu1.tools.numeric.algebra.GVector3d.scale()

    GVector2d lpcRad = GVector2d.scale(GaiaParam.Nature.MILLIARCSECOND_RADIAN, lpc);
   
    GVector3d pos = new GVector3d(triad[2]);
    pos.add(GVector3d.scale(lpcRad.getX(), triad[0]));
    pos.add(GVector3d.scale(lpcRad.getY(), triad[1]));
    pos.scale(1/Math.sqrt(1+lpcRad.normSquared()));
   
    return pos;
   
  }
 
View Full Code Here

Examples of general.datastructures.Vector2f.scale()

    assertEquals(14, vec3.y(),0.0001);
   
    Vector2f vec4 = new Vector2f(4,0);
    vec4.normalize();
    assertEquals(1, vec4.length(), 0.0001);
    vec4.scale(3f);
    assertEquals(3, vec4.length(), 0.0001)
  }
 
  @Test
  public void testRectangle()
View Full Code Here

Examples of geomerative.RShape.scale()

   * @return RShape The SVG file contents, if it exists. Otherwise null.
   */
  private RShape loadNewShape(String filename) {
    System.out.println("loading " + filename);
    RShape shape = RG.loadShape(BUFFER_ACC_PATH + filename);
    shape.scale(svgScale, shape.getCenter());
    print(shape, "loaded: ");
    return shape;
  }
 
  private String[] getFiles() {
View Full Code Here

Examples of gov.sandia.cognition.math.matrix.Matrix.scale()

        thisKf.getModel().setB(offsetIdent);

        final Matrix measIdent = MatrixFactory.getDefault().createIdentity(
            thisKf.getModel().getOutputDimensionality(),
            thisKf.getModel().getOutputDimensionality());
        thisKf.setMeasurementCovariance(measIdent.scale(scaleSample));

        final Matrix modelIdent = MatrixFactory.getDefault().createIdentity(
            thisKf.getModel().getStateDimensionality(),
            thisKf.getModel().getStateDimensionality());
        thisKf.setModelCovariance(modelIdent.scale(scaleSample));
View Full Code Here

Examples of gov.sandia.cognition.math.matrix.Vector.scale()

    final Vector betaCovPriorMean = VectorFactory.getDefault().copyArray(
      new double[] {200d});
    final double betaPriorCovDof = 2 + betaCovPriorMean.getDimensionality();
    final ScaledInverseGammaCovDistribution priorBetaCov =
        new ScaledInverseGammaCovDistribution(betaCovPriorMean.getDimensionality()
          betaCovPriorMean.scale(betaPriorCovDof - 1d).getElement(0),
          betaPriorCovDof);
    final MultivariateGaussian priorBeta =
        new MultivariateGaussian(VectorFactory.getDenseDefault().copyArray(
            new double[] {0d}), priorBetaCov.getMean());
View Full Code Here

Examples of hipi.image.FloatImage.scale()

      for (FloatImage val : values) {
        mean.add(val);
        total++;
      }
      if (total > 0) {
        mean.scale(1.0f / total);
        context.write(key, mean);
      }
    }
  }
View Full Code Here

Examples of java.awt.Graphics2D.scale()

     
      // Now change coordinate system for circuit, including
      // translation and possible scaling
      if (g2 != null) {
        if (scale < 1.0) {
          g2.scale(scale, scale);
          imWidth /= scale;
          imHeight /= scale;
        }
        double dx = Math.max(0.0, (imWidth - bds.getWidth()) / 2);
        g2.translate(-bds.getX() + dx, -bds.getY());
View Full Code Here

Examples of java.awt.geom.AffineTransform.scale()

        SVGUserAgent ua = new SVGUserAgent(userAgent, new AffineTransform());

        //Scale for higher resolution on-the-fly images from Batik
        double s = uaResolution / deviceResolution;
        AffineTransform resolutionScaling = new AffineTransform();
        resolutionScaling.scale(s, s);

        //Controls whether text painted by Batik is generated using text or path operations
        boolean strokeText = false;
        Configuration cfg = pdfInfo.cfg;
        if (cfg != null) {
View Full Code Here

Examples of java.math.BigDecimal.scale()

               Object value, boolean isSelected, boolean hasFocus,
               int row, int column) {
            BigDecimal valueAddedTaxPercentage = ((CatalogPieceOfFurniture)value).getValueAddedTaxPercentage();
            if (valueAddedTaxPercentage != null) {
              NumberFormat percentInstance = DecimalFormat.getPercentInstance();
              percentInstance.setMinimumFractionDigits(valueAddedTaxPercentage.scale() - 2);
              value = percentInstance.format(valueAddedTaxPercentage);
            } else {
              value = "";
            }
            setHorizontalAlignment(JLabel.RIGHT);
View Full Code Here

Examples of java.math.BigInteger.scale()

                }
                case BIGDECIMAL: {
                    BigDecimal n1 = toBigDecimal(first);
                    BigDecimal n2 = toBigDecimal(second);
                    int scale1 = n1.scale();
                    int scale2 = n2.scale();
                    int scale = Math.max(scale1, scale2);
                    scale = Math.max(minScale, scale);
                    return n1.divide(n2, scale, roundingPolicy);
                }
            }
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.