Examples of angleTo()


Examples of com.vividsolutions.jts.math.Vector2D.angleTo()

      double outerAng = 2 * Math.PI - cornerAng;
      maxAngToBisec = maxAngleToBisector(outerAng);
    }
   
    Vector2D pointwiseDisplacement = Vector2D.create(nearPt, vertexPt).normalize();
    double stretchAng = pointwiseDisplacement.angleTo(bisec);
    double stretchAngClamp = MathUtil.clamp(stretchAng, -maxAngToBisec, maxAngToBisec);
    Vector2D cornerDisplacement = bisec.rotate(-stretchAngClamp).multiply(dist);
    return cornerDisplacement.translate(vertexPt);
  }
View Full Code Here

Examples of gwlpr.protocol.util.Vector2.angleTo()

        Direction dir = et.get(Direction.class);
        Movement move = et.get(Movement.class);
       
        Vector2 direction1 = pos.position.vecWithEndpoint(move.moveAim);
       
        float angle = direction1.angleTo(dir.direction);
       
        move.moveAim = pos.position;
        move.moveType = MovementType.Stop;
        move.moveState = MovementState.NotMoving;
View Full Code Here

Examples of lejos.robotics.Pose.angleTo()

            }
          }         
          if (!validReadings) continue;
         
          //Check there are no obstacles in the way
          testPose.setHeading(testPose.angleTo(pose.getLocation()));
          if (map.range(testPose) < testPose.distanceTo(pose.getLocation()))
            continue;         
         
          testPose.setHeading(heading); // Restore heading
          break; // We have a new way point
View Full Code Here

Examples of lejos.robotics.Pose.angleTo()

  }

  public Pose goTo(Point destination) {
    Pose pose = poseProvider.getPose();
    if (pilot instanceof RotatePilot) { // optimize for RotatePilot
        float turnAngle = pose.angleTo(destination) - pose.getHeading();
        while (turnAngle < -180)turnAngle += 360;
        while (turnAngle > 180) turnAngle -= 360;
      ((RotatePilot) pilot).rotate(turnAngle);
      pilot.travel(pose.distanceTo(destination));     
    } else {
View Full Code Here

Examples of org.nlogo.api.Vect.angleTo()

    cors = cors.add(rotationPoint);

    Vect rightxy = new Vect(right.x(), right.y(), 0);
    rightxy = rightxy.normalize();
    heading = StrictMath.toDegrees(rightxy.angleTo(xaxis));

    oxyandzcor(cors.x(), cors.y(), cors.z());
  }

  private Vect forward;
View Full Code Here

Examples of org.nlogo.api.Vect.angleTo()

      return false;
    }

    Vect unitVect = Vect.toVectors(h, p, 0)[0];
    Vect targetVect = new Vect(x - cx, y - cy, z - cz);
    double angle = targetVect.angleTo(unitVect);
    double halfRadians = StrictMath.toRadians(half);

    return angle <= halfRadians || angle >= (2 * StrictMath.PI - halfRadians);
  }
}
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.