Use f64 type in layout

This commit is contained in:
Gabriel Majeri
2020-07-15 19:42:37 +03:00
committed by Keavon Chambers
parent e8058513f3
commit 420314d0b3
3 changed files with 9 additions and 9 deletions
+3 -3
View File
@@ -108,7 +108,7 @@ impl Attribute {
}
/// Extracts a percentage from this attribute's value.
fn percent(self) -> f32 {
fn percent(self) -> f64 {
match self.dimension() {
Dimension::Percent(value) => value,
_ => panic!("expected a percentage"),
@@ -151,8 +151,8 @@ pub enum AttributeValue {
pub struct LayoutAttributes {
pub width: Dimension,
pub height: Dimension,
pub x_align: f32,
pub y_align: f32,
pub x_align: f64,
pub y_align: f64,
pub spacing: BoxDimensions,
pub padding: BoxDimensions,
}