diff --git a/src/math.rs b/src/math.rs index 2d9ff1c6..4cf18ea8 100644 --- a/src/math.rs +++ b/src/math.rs @@ -1,4 +1,8 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#[inline] pub(crate) fn f32_trunc(val: f32) -> f32 { #[cfg(feature = "std")] { val.round() } @@ -6,6 +10,7 @@ pub(crate) fn f32_trunc(val: f32) -> f32 { { libm::roundf(val) } } +#[inline] pub(crate) fn f32_round(val: f32) -> f32 { #[cfg(feature = "std")] { val.round() } @@ -13,6 +18,7 @@ pub(crate) fn f32_round(val: f32) -> f32 { { libm::roundf(val) } } +#[inline] pub(crate) fn f64_pow(a: f64, b: f64) -> f64 { #[cfg(feature = "std")] { f64::powf(a, b) }