cosmic_text/
math.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#[cfg(not(feature = "std"))]
pub use libm::{floorf, roundf, truncf};

#[cfg(feature = "std")]
#[inline]
pub fn floorf(x: f32) -> f32 {
    x.floor()
}

#[cfg(feature = "std")]
#[inline]
pub fn roundf(x: f32) -> f32 {
    x.round()
}

#[cfg(feature = "std")]
#[inline]
pub fn truncf(x: f32) -> f32 {
    x.trunc()
}