/** {@inheritDoc} */ @Override default void setToNaN() { setYaw(Double.NaN); }
/** * Sets the yaw angle of this orientation 2D to zero. */ @Override default void setToZero() { setYaw(0.0); }
/** * Sets this orientation 2D to the yaw angle of the given {@code orientation3DReadOnly}. * * @param orientation3DReadOnly the orientation to get the yaw angle from. Not modified. */ default void set(Orientation3DReadOnly orientation3DReadOnly) { setYaw(orientation3DReadOnly.getYaw()); }
/** * Sets the orientation yaw angle value. * * @param yaw the orientation angle value. */ default void setYaw(double yaw) { getOrientation().setYaw(yaw); }
/** * Sets this orientation 2D to the {@code other} orientation 2D. * * @param other the other orientation 2D. Not modified. */ default void set(Orientation2DReadOnly other) { setYaw(other.getYaw()); }
/** * Sets the orientation angle value. * * @param yaw the orientation angle value. */ default void setOrientation(double yaw) { getOrientation().setYaw(yaw); }
/** * Sets this orientation 2D to the difference of the two given yaw angles:<br> * {@code this.yaw = yaw1 - yaw2} * <p> * Note that resulting angle is computed such that it is contained in [-<i>pi</i>, <i>pi</pi>]. * </p> * * @param yaw1 the first yaw angle. * @param yaw2 the second yaw angle. */ default void sub(double yaw1, double yaw2) { setYaw(EuclidCoreTools.angleDifferenceMinusPiToPi(yaw1, yaw2)); }
/** * Sets this orientation 2D to the sum of the two given yaw angles:<br> * {@code this.yaw = yaw1 + yaw2} * <p> * Note that resulting angle is computed such that it is contained in [-<i>pi</i>, <i>pi</pi>]. * </p> * * @param yaw1 the first yaw angle. * @param yaw2 the second yaw angle. */ default void add(double yaw1, double yaw2) { setYaw(EuclidCoreTools.trimAngleMinusPiToPi(yaw1 + yaw2)); }