Inline always in new_from_parts

This commit is contained in:
Gwilym Inzani 2023-05-23 21:46:25 +01:00
parent 98484783b4
commit 8c1c725dfa

View file

@ -416,6 +416,7 @@ impl<I: FixedWidthUnsignedInteger, const N: usize> Num<I, N> {
}
#[doc(hidden)]
#[inline(always)]
/// Called by the [num!] macro in order to create a fixed point number
pub fn new_from_parts(num: (i32, i32)) -> Self {
Self(I::from_as_i32(((num.0) << N) + (num.1 >> (30 - N))))