We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a7aa398 commit b96cd47Copy full SHA for b96cd47
src/math.rs
@@ -1,18 +1,24 @@
1
+/* This Source Code Form is subject to the terms of the Mozilla Public
2
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5
+#[inline]
6
pub(crate) fn f32_trunc(val: f32) -> f32 {
7
#[cfg(feature = "std")]
8
{ val.round() }
9
#[cfg(not(feature = "std"))]
10
{ libm::roundf(val) }
11
}
12
13
14
pub(crate) fn f32_round(val: f32) -> f32 {
15
16
17
18
19
20
21
22
pub(crate) fn f64_pow(a: f64, b: f64) -> f64 {
23
24
{ f64::powf(a, b) }
0 commit comments