bugfix(dpi): PhysicalUnit::to_logical computation
The conversion of PhysicalUnit was wrongly computed and the tests were not running on the CI for the dpi crate, thus it was missed, even though the test was correctly failing. Signed-off-by: John Nunley <dev@notgull.net> Signed-off-by: Kirill Chibisov <contact@kchibisov.com>
This commit is contained in:
parent
66df2c22ba
commit
249d5d8bff
2 changed files with 8 additions and 1 deletions
|
|
@ -250,7 +250,7 @@ impl<P: Pixel> PhysicalUnit<P> {
|
|||
#[inline]
|
||||
pub fn to_logical<X: Pixel>(&self, scale_factor: f64) -> LogicalUnit<X> {
|
||||
assert!(validate_scale_factor(scale_factor));
|
||||
LogicalUnit::new(self.0.into() * scale_factor).cast()
|
||||
LogicalUnit::new(self.0.into() / scale_factor).cast()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue