diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-05-27 14:48:45 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-05-27 14:48:45 +0200 |
| commit | b886ced40825372000df0fa9cddff98a1b642cc6 (patch) | |
| tree | 6baf23b24c90352f3712f0e8eda57decf913181a /src/layout/mod.rs | |
| parent | 9e0a34c80f2fa48ada3a0ed0c985c8daa2ae7de3 (diff) | |
Switch to N64 type alias
Diffstat (limited to 'src/layout/mod.rs')
| -rw-r--r-- | src/layout/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/layout/mod.rs b/src/layout/mod.rs index 51b9bc64..a025fbc2 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -20,7 +20,7 @@ use std::any::Any; use std::fmt::{self, Debug, Formatter}; use std::hash::{Hash, Hasher}; -use decorum::NotNan; +use decorum::N64; use fxhash::FxHasher64; use crate::cache::{Cache, FramesEntry}; @@ -257,7 +257,7 @@ impl Regions { } /// Shrink `current` to ensure that the aspect ratio can be satisfied. - pub fn apply_aspect_ratio(&mut self, aspect: NotNan<f64>) { + pub fn apply_aspect_ratio(&mut self, aspect: N64) { let width = self.current.width.min(aspect.into_inner() * self.current.height); let height = width / aspect.into_inner(); self.current = Size::new(width, height); |
