diff --git a/agb-fixnum/src/lib.rs b/agb-fixnum/src/lib.rs index be592af9..47036f28 100644 --- a/agb-fixnum/src/lib.rs +++ b/agb-fixnum/src/lib.rs @@ -301,6 +301,16 @@ impl Num { /// Attempts to perform the conversion between two integer types and between /// two different fractional precisions + /// ``` + /// # use agb_fixnum::*; + /// let a: Num = 1.into(); + /// let b: Option> = a.try_change_base(); + /// assert_eq!(b, Some(1.into())); + /// + /// let a: Num = 18.into(); + /// let b: Option> = a.try_change_base(); + /// assert_eq!(b, None); + /// ``` pub fn try_change_base, const M: usize>( self, ) -> Option> {