mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +11:00
Inline always in new_from_parts (#433)
Mentioned here that we should probably do it: https://github.com/agbrs/agb/discussions/370#discussioncomment-4650702 From decompiling, it seems that this normally happens, but lets at least ensure it if you don't have lto enabled. - [x] no changelog update needed
This commit is contained in:
commit
1b687b787d
|
@ -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))))
|
||||
|
|
Loading…
Reference in a new issue