Examples of sub()


Examples of processing.core.PVector.sub()

   
    if(projection == null || being1==being2) {
      return false// if they aren't colliding
    }
    if(projection.x==0 && Math.abs(projection.y)<smallerBeingHeight) {
      projection.sub(makeVector(0, smallerBeingHeight * sign(projection.y)));
      MassedBeing.addImpulseCollision(biggerBeing, smallerBeing, projection);
      return true;
    } else if (projection.y==0 && Math.abs(projection.x)<smallerBeingWidth) {
      projection.sub(makeVector(smallerBeingWidth * sign(projection.x), 0));
      MassedBeing.addImpulseCollision(biggerBeing, smallerBeing, projection);
View Full Code Here

Examples of ral.Real.sub()

   * @param other subtrahend.
   * @return new instance of {@code Decimal} which value is {@code this.value} - {@code other.value}.
   */
  public Decimal sub(final Decimal other) {
    Real result = new Real(this.value);
    result.sub(other.value);
    return new Decimal(result);
  }

  /**
   * Calculates square of {@code this.value} according to {@link ral.Real#sqr()}.
View Full Code Here

Examples of soc.qase.tools.vecmath.Vector3f.sub()

        isNoClip = true;
      }
      else
      {
        Vector3f pos = new Vector3f(world.getPlayer().getPlayerMove().getOrigin());
        pos.sub(initPos, pos);

        if(pos.length() < 2)
        {
          pacify();
          initPosReached = true;
View Full Code Here

Examples of sunlabs.brazil.util.regexp.Regexp.sub()

   * check the regexp patterns
   */

  for (int i = 0; i<patternMap.size(); i+= 3) {
      Regexp exp = (Regexp) patternMap.elementAt(i+2);
      String replace = exp.sub(fix, (String) patternMap.elementAt(i+1));
      if (replace != null) {
    count++;
    return replace;
      }
  }
View Full Code Here

Examples of tkuri.uty.Bs.sub()

      int c = host.indexOf(':');
      if (c < 0) {
        port = 80;
      } else {
        port = (int) host.sub(c + 1).toLong();
        host = host.slice(0, c);
      }

    } else {
      host = Bs.valueOf("localhost");
View Full Code Here

Examples of toxi.geom.Vec2D.sub()

      vecAfter = this.getPos((percent + offsetSearch));

    if (vecAfter == null)
      return null;

    vecAfter = (Vec2D) vecAfter.sub(vecBefore);
    vecAfter.normalize();
    // SketchPoint newAn = vecAfter.getRotated((float)(Math.PI/2));

    if (WoundClockwise())
      vecAfter = vecAfter.rotate((float) Math.PI);
View Full Code Here

Examples of toxi.geom.Vec3D.sub()

            intersectRay.setDirection(dir);
            Vec3D isec = box.intersectsRay(intersectRay, 0, Float.MAX_VALUE);
            if (isec != null) {
                isec.addSelf(box.getNormalForPoint(isec).scaleSelf(0.01f));
                p.setPreviousPosition(isec);
                p.set(isec.sub(dir.scaleSelf(restitution)));
            }
        }
    }

    public AABB getBox() {
View Full Code Here

Examples of zz.jinterp.JPrimitive.JNumber.sub()

      case LSUB:
      case FSUB:
      case DSUB: {
        JNumber n2 = (JNumber) pop();
        JNumber n1 = (JNumber) pop();
        push(n1.sub(n2));
      } break;
       
      case IMUL:
      case LMUL:
      case FMUL:
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.