diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-10-10 22:19:36 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-10-10 22:19:36 +0200 |
| commit | 92c01da36016e94ff20163806ddcbcf7e33d4031 (patch) | |
| tree | 1a900b3c11edcc93e9153fada3ce92310db5768b /src/eval/value.rs | |
| parent | 42500d5ed85539c5ab04dd3544beaf802da29be9 (diff) | |
Switch back to custom geometry types, unified with layout primitives 🏞
Diffstat (limited to 'src/eval/value.rs')
| -rw-r--r-- | src/eval/value.rs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/eval/value.rs b/src/eval/value.rs index c4b11ebe..56dadfc3 100644 --- a/src/eval/value.rs +++ b/src/eval/value.rs @@ -6,7 +6,7 @@ use std::rc::Rc; use super::{Args, Dict, Eval, EvalContext, SpannedEntry}; use crate::color::RgbaColor; -use crate::geom::Linear; +use crate::geom::{Length, Linear, Relative}; use crate::syntax::{Ident, SynTree}; /// A computational value. @@ -23,14 +23,9 @@ pub enum Value { /// A floating-point number: `1.2, 200%`. Float(f64), /// A length: `2cm, 5.2in`. - Length(f64), + Length(Length), /// A relative value: `50%`. - /// - /// _Note_: `50%` is represented as `0.5` here, but as `50.0` in the - /// corresponding [literal]. - /// - /// [literal]: ../syntax/ast/enum.Lit.html#variant.Percent - Relative(f64), + Relative(Relative), /// A combination of an absolute length and a relative value: `20% + 5cm`. Linear(Linear), /// A color value with alpha channel: `#f79143ff`. |
