@Test void angleWrap() { assertEquals(MathUtil.angleWrap(Math.PI * 4.5), Math.PI / 2, MathUtil.EPSILON); assertEquals(MathUtil.angleWrap(Math.PI * 5.5), -Math.PI / 2, MathUtil.EPSILON); assertEquals(MathUtil.angleWrap(Math.PI * 1000000), 0, MathUtil.EPSILON); }
public static double angleWrap(double angle) { double negTauToTau = angle % (Math.PI * 2); if (Math.abs(negTauToTau) > Math.PI) { negTauToTau -= Math.copySign(Math.PI * 2, negTauToTau); } return negTauToTau; }
MathUtil { public static double angleWrap(double angle) { double negTauToTau = angle % (Math.PI * 2); if (Math.abs(negTauToTau) > Math.PI) { negTauToTau -= Math.copySign(Math.PI * 2, negTauToTau); } return negTauToTau; } }
MathUtil { public static double angleWrap(double angle) { double negTauToTau = angle % (Math.PI * 2); if (Math.abs(negTauToTau) > Math.PI) { negTauToTau -= Math.copySign(Math.PI * 2, negTauToTau); } return negTauToTau; }  }
MathUtil { public static double angleWrap(double angle) { double negTauToTau = angle % (Math.PI * 2); if (Math.abs(negTauToTau) > Math.PI) { negTauToTau -= Math.copySign(Math.PI * 2, negTauToTau); } return negTauToTau; }  static double angleWrap(double angle); static double clamp(double d); static double clampAbove(double d, double threshold); static double cutOffBelow(double d, double threshold); static double powRetainingSign(double d, double power); static double deadZone(double d, double thresh); static Pose relativeOdometryUpdate(Pose fieldPose, Pose robotPoseDelta); static boolean approxEquals(double d1, double d2); static Point lineSegmentCircleIntersection(Point ul1, Point ul2, Point o, double radius); static boolean between(double r1, double r2, double val, double threshold); }
MathUtil { public static double angleWrap(double angle) { double negTauToTau = angle % (Math.PI * 2); if (Math.abs(negTauToTau) > Math.PI) { negTauToTau -= Math.copySign(Math.PI * 2, negTauToTau); } return negTauToTau; }  static double angleWrap(double angle); static double clamp(double d); static double clampAbove(double d, double threshold); static double cutOffBelow(double d, double threshold); static double powRetainingSign(double d, double power); static double deadZone(double d, double thresh); static Pose relativeOdometryUpdate(Pose fieldPose, Pose robotPoseDelta); static boolean approxEquals(double d1, double d2); static Point lineSegmentCircleIntersection(Point ul1, Point ul2, Point o, double radius); static boolean between(double r1, double r2, double val, double threshold); static final double EPSILON; }