Examples of mul()


Examples of com.nr.Complex.mul()

      aa=new Complex(-0.5,-5.0+0.1*i);
      bb=new Complex(1.0,0.0);
      cc=new Complex(-0.5,-5.0+0.1*i);
      zz=new Complex(-5.0+0.1*i,-5.0+0.1*i);
      Complex r = cc.mul(2.0).sub(aa).sub(bb).sub(new Complex(1.0));
      r = cc.sub(new Complex(1.0)).sub(r.mul(zz));
      r = cc.mul(r).mul(hypgeo(aa,bb,cc,zz));
      Complex rr =(cc.sub(aa)).mul(cc.sub(bb)).mul(zz).mul(hypgeo(aa,bb,cc.sub(new Complex(1.0)),zz));
      res1 = r.add(rr);
      //res1=cc*(cc-1.0-(2.0*cc-aa-bb-1.0)*zz)*hypgeo(aa,bb,cc,zz)
      //  + (cc-aa)*(cc-bb)*zz*hypgeo(aa,bb,cc+1.0,zz);
 
View Full Code Here

Examples of com.nr.Complex.mul()

    dyds[0]=y[1].mul(dz);
    //dyds[1]=(a*b*y[0]-(c-(a+b+1.0)*z)*y[1])*dz/(z*(1.0-z));
   
    Complex aa = c.sub((a.add(b).add(new Complex(1,0))).mul(z));
    Complex bb = a.mul(b).mul(y[0]).sub(aa.mul(y[1]));
    dyds[1]=bb.mul(dz).div(z.mul(new Complex(1.0,0).sub(z)));
   
    dyyds[0]=dyds[0].re();
    dyyds[1]=dyds[0].im();
    dyyds[2]=dyds[1].re();
    dyyds[3]=dyds[1].im();
View Full Code Here

Examples of com.nr.Complex.mul()

        a= -i*i;
        b = b.add(new Complex(2.0,0));
        d= new Complex(1.0,0).div(new Complex(a,0).mul(d).add(b)); // d=1.0/(a*d+b);
        c=b.add(new Complex(a,0).div(c)); // c=b+a/c;
        del=c.mul(d);
        h = h.mul(del);
        if (abs(del.re()-1.0)+abs(del.im()) <= EPS) break;
      }
      if (i >= MAXIT) throw new IllegalArgumentException("cf failed in cisi");
      h=new Complex(cos(t),-sin(t)).mul(h);
      //cs= -conj(h)+Complex(0.0,PIBY2);
View Full Code Here

Examples of com.nr.Complex.mul()

    sbeps=1.e-13;
    ncount=0;   // Count roots outside unit circle
    for (i=0;i<NPOLES;i++) {
      z1=zeros[i].sub(new Complex(0.5,0))// compute (z-1/2)^6=1.0
      z2=z1.mul(z1).mul(z1);
      z1=z2.mul(z2);
      //System.out.printf(setprecision(18) << abs(z1-Complex(1.0,0.0)));
      localflag = z1.sub(new Complex(1.0,0.0)).abs() > sbeps;
      //System.out.printf(abs(zeros[i]));
      if (zeros[i].abs() > 1.0) ncount++;
      globalflag = globalflag || localflag;
View Full Code Here

Examples of com.sun.codemodel.JExpression.mul()

      for(HoldingContainer v : inputVariables){
        if(v.isOptional()){
          if(e == null){
            e = v.getIsSet();
          }else{
            e = e.mul(v.getIsSet());
          }
        }
      }
     
      if(e != null){
View Full Code Here

Examples of com.xith3d.scenegraph.Transform3D.mul()

    if ((transformRoot==this) && (transformChildren.size()!=0)){
      Transform3D composedTrans = new Transform3D();
     
      for(int i=transformChildren.size()-1; i>=0; i--){
        ((TransformData)transformChildren.get(i)).updateTransform();
        composedTrans.mul (((TransformDataXith3d)transformChildren.get(i)).getTransform());
      }
      composedTrans.mul(trans);
      group.setTransform(composedTrans);

     
View Full Code Here

Examples of com.xith3d.scenegraph.Transform3D.mul()

     
      for(int i=transformChildren.size()-1; i>=0; i--){
        ((TransformData)transformChildren.get(i)).updateTransform();
        composedTrans.mul (((TransformDataXith3d)transformChildren.get(i)).getTransform());
      }
      composedTrans.mul(trans);
      group.setTransform(composedTrans);

     
      // Single transform
    }else{
View Full Code Here

Examples of cranks.geom.Angle.mul()

      GeometricalObject o = (GeometricalObject)step.getInputs()[0];
      Point translation = new Point(((Double)step.getInputs()[1]).doubleValue(),
                                    ((Double)step.getInputs()[2]).doubleValue());
      Angle rotation = new Angle(((Double)step.getInputs()[3]).doubleValue());
      Point fixedPoint = (Point)step.getInputs()[4];
      rotation = rotation.mul(-1);
      translation = new Point(translation.getX()*(-1), translation.getY()*(-1));
      o.move(new Point(), rotation, fixedPoint);
      o.move(translation, new Angle(0), fixedPoint);
    }
    else
View Full Code Here

Examples of fcagnin.jglsdk.glm.Mat4.mul()

      mat = Glm.translate(mat, new Vec3(0.0f, 0.0f, -m_currView.radius));

      // Rotate the world to look in the right direction..
      Quaternion fullRotation = Glm.angleAxis(m_currView.degSpinRotation, new Vec3(0.0f, 0.0f, 1.0f)).mul(m_currView.orient);

      mat.mul(Glm.matCast(fullRotation));

      // Translate the world by the negation of the lookat point, placing the origin at the lookat point.
      mat = Glm.translate(mat, Vec3.negate(m_currView.targetPos));

      return mat;
View Full Code Here

Examples of fcagnin.jglsdk.glm.Quaternion.mul()

    private void offsetTargetPos(Vec3 cameraOffset, float lastFrameDuration) {
      Mat4 currMat = calcMatrix();
      Quaternion orientation = Glm.quatCast(currMat);

      Quaternion invOrient = Glm.conjugate(orientation);
      Vec3 worldOffset = invOrient.mul(cameraOffset);

      m_currView.targetPos.add(worldOffset);
    }
  }
}
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.