/** * Subtracts the given {@code yaw} angle from this orientation 2D:<br> * {@code this.yaw -= yaw} * * @param yaw the angle to subtract. */ default void sub(double yaw) { sub(getYaw(), yaw); }
/** * Subtracts the other orientation 2D from this orientation 2D:<br> * {@code this -= other} * <p> * Note that resulting angle is computed such that it is contained in [-<i>pi</i>, <i>pi</pi>]. * </p> * * @param other the other orientation 2D to subtract. Not modified. */ default void sub(Orientation2DReadOnly other) { sub(other.getYaw()); }
/** * Subtracts the other orientation 2D to this:<br> * {@code this -= other} * <p> * Note that resulting angle is computed such that it is contained in [-<i>pi</i>, <i>pi</pi>]. * </p> * * @param other the other orientation 2D to add to this. Not modified. * @throws ReferenceFrameMismatchException if {@code other} is not expressed in the same frame as * {@code this}. */ default void sub(FrameOrientation2DReadOnly other) { checkReferenceFrameMatch(other); Orientation2DBasics.super.sub(other); }
/** * Sets this orientation 2D to the difference of the two given orientation 2Ds:<br> * {@code this = orientation1 - orientation2} * <p> * Note that resulting angle is computed such that it is contained in [-<i>pi</i>, <i>pi</pi>]. * </p> * * @param orientation1 the first orientation 2D. Not modified. * @param orientation2 the second orientation 2D. Not modified. * @throws ReferenceFrameMismatchException if {@code orientation1} is not expressed in the same * frame as {@code this}. */ default void sub(FrameOrientation2DReadOnly orientation1, Orientation2DReadOnly orientation2) { checkReferenceFrameMatch(orientation1); Orientation2DBasics.super.sub(orientation1, orientation2); }
/** * Sets this orientation 2D to the difference of the two given orientation 2Ds:<br> * {@code this = orientation1 - orientation2} * <p> * Note that resulting angle is computed such that it is contained in [-<i>pi</i>, <i>pi</pi>]. * </p> * * @param orientation1 the first orientation 2D. Not modified. * @param orientation2 the second orientation 2D. Not modified. * @throws ReferenceFrameMismatchException if {@code orientation2} is not expressed in the same * frame as {@code this}. */ default void sub(Orientation2DReadOnly orientation1, FrameOrientation2DReadOnly orientation2) { checkReferenceFrameMatch(orientation2); Orientation2DBasics.super.sub(orientation1, orientation2); }
/** * Sets this orientation 2D to the difference of the two given orientation 2Ds:<br> * {@code this = orientation1 - orientation2} * <p> * Note that resulting angle is computed such that it is contained in [-<i>pi</i>, <i>pi</pi>]. * </p> * * @param orientation1 the first orientation 2D. Not modified. * @param orientation2 the second orientation 2D. Not modified. */ default void sub(Orientation2DReadOnly orientation1, Orientation2DReadOnly orientation2) { sub(orientation1.getYaw(), orientation2.getYaw()); }
/** * Sets this orientation 2D to the difference of the two given orientation 2Ds:<br> * {@code this = orientation1 - orientation2} * <p> * Note that resulting angle is computed such that it is contained in [-<i>pi</i>, <i>pi</pi>]. * </p> * * @param orientation1 the first orientation 2D. Not modified. * @param orientation2 the second orientation 2D. Not modified. * @throws ReferenceFrameMismatchException if {@code this}, {@code orientation1}, and * {@code orientation2} are not expressed in the same reference frame. */ default void sub(FrameOrientation2DReadOnly orientation1, FrameOrientation2DReadOnly orientation2) { checkReferenceFrameMatch(orientation1); checkReferenceFrameMatch(orientation2); Orientation2DBasics.super.sub(orientation1, orientation2); }