Examples of mul()


Examples of Makelangelo.C3.mul()

      quant_error.set( oldPixel.sub( newPixel ) );
      // pixel[x+1][y  ] += 7/16 * quant_error
      // pixel[x-1][y+1] += 3/16 * quant_error
      // pixel[x  ][y+1] += 5/16 * quant_error
      // pixel[x+1][y+1] += 1/16 * quant_error
        nexterror[x          ].add(quant_error.mul(5.0/16.0));
      if(x+direction>=0 && x+direction < w) {
            error[x+direction].add(quant_error.mul(7.0/16.0));
        nexterror[x+direction].add(quant_error.mul(1.0/16.0));
      }
      if(x-direction>=0 && x-direction < w) {
View Full Code Here

Examples of com.badlogic.gdx.graphics.Color.mul()

    color.a *= parentAlpha;
    if (style.background != null) {
      batch.setColor(color.r, color.g, color.b, color.a);
      style.background.draw(batch, getX(), getY(), getWidth(), getHeight());
    }
    if (style.fontColor != null) color.mul(style.fontColor);
    cache.setColors(color);
    cache.setPosition(getX(), getY());
    cache.draw(batch);
  }

View Full Code Here

Examples of com.badlogic.gdx.math.Vector2.mul()

  }

  public void goTowardsOrAway(Vector2 targetPos, boolean isAway) {
    Vector2 target_direction = targetPos.cpy().sub(body.getWorldCenter().cpy());
    if (isAway) {
      target_direction.mul(-1);
    }
   
    if (body.getWorldVector(new Vector2(0, 1f)).cpy().crs(target_direction) > 0) {
      turn(1);
    } else {
View Full Code Here

Examples of com.badlogic.gdx.math.Vector3.mul()

    normalizeUp();
  }

  private float calculateAngle (float a) {
    Vector3 camPos = calculateDirection(a);
    position.set(camPos.mul(30));
    lookAt(0, 0, 0);
    normalizeUp();
    update();

    Vector3 orig = new Vector3(0, 0, 0);
View Full Code Here

Examples of com.bulletphysics.linearmath.Transform.mul()

      triface1 = pair.index2;
      CollisionShape colshape0 = retriever0.getChildShape(triface0);
      CollisionShape colshape1 = retriever1.getChildShape(triface1);

      if (child_has_transform0) {
        tmpTrans.mul(orgtrans0, shape0.getChildTransform(triface0));
        body0.setWorldTransform(tmpTrans);
      }

      if (child_has_transform1) {
        tmpTrans.mul(orgtrans1, shape1.getChildTransform(triface1));
View Full Code Here

Examples of com.etsy.conjecture.data.StringKeyedVector.mul()

        StringKeyedVector gradients = instance.getVector().copy();
        double inner = param.dot(instance.getVector());
        double label = instance.getLabel().getAsPlusMinus();
        double z = inner * label;
        if (z <= this.threshold) {
            gradients.mul(-label);
            return gradients;
        } else {
            return new StringKeyedVector();
        }       
    }
View Full Code Here

Examples of com.exigen.ie.constrainer.IntExp.mul()

  /**
   * @return this * value
   */
  public javax.constraints.Var multiply(int value) {
    IntExp myVar = (IntExp) getImpl();
    return new Var(getProblem(),myVar.mul(value));
  }

  /**
   * @return this * var
   */
 
View Full Code Here

Examples of com.googlecode.jumpnevolve.math.Vector.mul()

        // Kraft hinzufügen, die in die gewünschte Bewegunsrichtung
        // zeigt
        // und entsprechend des Unterschieds zwischen Bewegung und
        // Wunsch
        // skaliert ist
        this.applyForce(direction.mul(mul * (move - vel) * 1.5f
            * this.getMass()));
      }

    }
    if (this instanceof Jumping) {
View Full Code Here

Examples of com.nr.Complex.mul()

     
      //res1=(cc-2.0*aa-(bb-aa)*zz)*hypgeo(aa,bb,cc,zz)
      //  + aa*(1.0-zz)*hypgeo(aa+1.0,bb,cc,zz);
      Complex r = bb.sub(aa).mul(zz);
      r = cc.sub(aa.mul(2.0)).sub(r);
      r = r.mul(hypgeo(aa,bb,cc,zz));
      res1 = r.add( aa.mul(new Complex(1.0).sub(zz)).mul(
          hypgeo(aa.add(new Complex(1.0)),bb,cc,zz)) );
     
      //res2=(cc-aa)*hypgeo(aa-1.0,bb,cc,zz);
      //      System.out.printf(abs(res1-res2));
View Full Code Here

Examples of com.nr.Complex.mul()

          hypgeo(aa.add(new Complex(1.0)),bb,cc,zz)) );
     
      //res2=(cc-aa)*hypgeo(aa-1.0,bb,cc,zz);
      //      System.out.printf(abs(res1-res2));
      r = cc.sub(aa);
      res2 = r.mul(hypgeo(aa.sub(new Complex(1.0)),bb,cc,zz));
      localflag = localflag || res1.sub(res2).abs() > sbeps;
     
    }
    globalflag = globalflag || localflag;
    if (localflag) {
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.