cosmic_text/
math.rs

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