(c, b | d)
}
+ /// Computes the absolute difference between `self` and `other`.
+ ///
+ /// # Examples
+ ///
+ /// Basic usage:
+ ///
+ /// ```
+ /// #![feature(int_abs_diff)]
+ #[doc = concat!("assert_eq!(100", stringify!($SelfT), ".abs_diff(80), 20", stringify!($SelfT), ");")]
+ #[doc = concat!("assert_eq!(100", stringify!($SelfT), ".abs_diff(110), 10", stringify!($SelfT), ");")]
+ /// ```
+ #[unstable(feature = "int_abs_diff", issue = "none")]
+ #[inline]
+ pub const fn abs_diff(self, other: Self) -> Self {
+ if self < other {
+ other - self
+ } else {
+ self - other
+ }
+ }
+
/// Calculates the multiplication of `self` and `rhs`.
///
/// Returns a tuple of the multiplication along with a boolean