Examples of scale()


Examples of javax.vecmath.Vector3d.scale()

    }

    private void airDrag() {
        Vector3d drag = new Vector3d(speed);
        drag.normalize();
        drag.scale(Math.abs(attackAngle)+0.1)
        drag.scale(speedSquared);
        drag.scale(-0.0005);
        speed.add(drag);
    }
View Full Code Here

Examples of javax.vecmath.Vector3f.scale()

          }
          Vector3f view = new Vector3f(0,0,-1);
          rot.transform(view);
          float scale = (float)Math.pow(2.0, Math.abs(accuCopy))*getSceneSize()/200.0f;
          if (accuCopy<0) scale = -scale;
          view.scale(scale);
          trans.m03 += view.x;
          trans.m13 += view.y;
          trans.m23 += view.z;
          applyTransform();
        }
View Full Code Here

Examples of jscicalc.complex.Complex.scale()

    public OObject function( OObject x ){
  if( x instanceof Complex ){
      Complex c = (Complex)x;
      if( scale != 1 && Math.abs( c.imaginary() ) > 1e-6 )
    throw new RuntimeException( "Error" );
      return c.scale( scale ).sin();
  } else {
      return x.sin( angleType );
  }
    }
View Full Code Here

Examples of lcmc.crm.ui.CrmGraph.scale()

                            cphi.getService().setNew(true);
                        }
                    }
                }
                hg.killRemovedVertices();
                hg.scale();
            }
        });
    }

    /** Clears the info panel cache, forcing it to reload. */
 
View Full Code Here

Examples of math.Vector.scale()

 
  public static void applyRotationalImpulse(Vector rot, Matrix tensor, Vector impulse, Vector forceArm) {
    if (forceArm != null) {
      Vector rotImpulse = Physics.getRotationalMomentum(impulse, forceArm);
      double inertia = Physics.getMomentumOfInertia(tensor, rotImpulse);
      rot.add(rotImpulse.scale((inertia < 0.0005f) ? 0 : 1 / inertia));
    }     
  }

  /**
   * Calculates the specific momentum of inertia for a given axis from the
View Full Code Here

Examples of mikera.arrayz.INDArray.scale()

  }
 
  @Override
  public INDArray innerProduct(double a) {
    INDArray result=clone();
    result.scale(a);
    return result;
  }
 
  @Override
  public INDArray innerProduct(INDArray a) {
View Full Code Here

Examples of mikera.matrixx.Matrix.scale()

     */
    @Test
    public void checkQuality_scale() {
        Matrix A = DiagonalMatrix.create(4,3,2,1).toMatrix();
        Matrix Asmall = A.copy();
        Asmall.scale(0.01);

        LUSolver solver = new LUSolver();
       
        assertNotNull(solver.setA(A));
        double q;
View Full Code Here

Examples of mikera.vectorz.AVector.scale()

  @Test public void testNonZeroCount() {
    AVector v=Vectorz.createUniformRandomVector(5);
    v.add(1);
    assertEquals(v.length(),v.nonZeroCount());
   
    v.scale(0.0);
    assertEquals(0,v.nonZeroCount());
  }
 
  @Test public void testZeroPaddedReshape() {
    assertTrue(Vector0.INSTANCE.reshape(1,1).asVector().isZero());
View Full Code Here

Examples of mikera.vectorz.Vector.scale()

    Vectorz.fillGaussian(v);
   
    for (int i=0; i<runs; i++) {
      v.add(0.375);
      v.sqrt();
      v.scale(2.0);
    }   
  }
 
  public void timeImmutable(int runs) {
    Vector v=Vector.createLength(8388608);
View Full Code Here

Examples of net.phys2d.math.Vector2f.scale()

    }

    final Vector2f direction = new Vector2f(p2);
    direction.sub(p1);
    direction.normalise();
    direction.scale(20);

    final Body bodies[] = new Body[N];
    final Vector2f pos = new Vector2f(p1);
    for (int i = 0; i < N; i++) {
      final Body body = new Body(new Box(15, 4), 5);
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.