Fix no_std build
This fixes the `no_std` build and also makes sure it's tested properly in the CI workflow.
This commit is contained in:
parent
0cb6eba6e7
commit
8582173128
8 changed files with 31 additions and 10 deletions
|
|
@ -63,8 +63,9 @@ pub enum SubpixelBin {
|
|||
|
||||
impl SubpixelBin {
|
||||
pub fn new(pos: f32) -> (i32, Self) {
|
||||
let (fract, truncf) = libm::modff(pos);
|
||||
let trunc = truncf as i32;
|
||||
let trunc = pos as i32;
|
||||
let fract = pos - trunc as f32;
|
||||
|
||||
if pos.is_sign_negative() {
|
||||
if fract > -0.125 {
|
||||
(trunc, Self::Zero)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue