Fix negative layers sorting incorrectly

This commit is contained in:
Tad Hardesty 2021-06-20 14:14:10 -07:00
parent a19cc58e32
commit c01baaa2a5

View file

@ -470,7 +470,7 @@ impl From<i32> for Layer {
impl From<f32> for Layer {
fn from(f: f32) -> Layer {
Layer { whole: f as i16, frac: ((f.fract() + 1.).fract() * 65536.) as u16 }
Layer { whole: f.floor() as i16, frac: ((f.fract() + 1.).fract() * 65536.) as u16 }
}
}