From b886ced40825372000df0fa9cddff98a1b642cc6 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Thu, 27 May 2021 14:48:45 +0200 Subject: Switch to N64 type alias --- src/library/shapes.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/library') diff --git a/src/library/shapes.rs b/src/library/shapes.rs index 05cc2e2d..a47203c4 100644 --- a/src/library/shapes.rs +++ b/src/library/shapes.rs @@ -1,6 +1,6 @@ use std::f64::consts::SQRT_2; -use decorum::NotNan; +use decorum::N64; use super::*; use crate::color::Color; @@ -49,14 +49,14 @@ pub fn square(ctx: &mut EvalContext, args: &mut FuncArgs) -> Value { let height = width.is_none().then(|| args.eat_named(ctx, "height")).flatten(); let fill = args.eat_named(ctx, "fill"); let body = args.eat::(ctx).unwrap_or_default(); - rect_impl("square", width, height, Some(1.0.into()), fill, body) + rect_impl("square", width, height, Some(N64::from(1.0)), fill, body) } fn rect_impl( name: &str, width: Option, height: Option, - aspect: Option>, + aspect: Option, fill: Option, body: TemplateValue, ) -> Value { @@ -121,14 +121,14 @@ pub fn circle(ctx: &mut EvalContext, args: &mut FuncArgs) -> Value { let height = width.is_none().then(|| args.eat_named(ctx, "height")).flatten(); let fill = args.eat_named(ctx, "fill"); let body = args.eat::(ctx).unwrap_or_default(); - ellipse_impl("circle", width, height, Some(1.0.into()), fill, body) + ellipse_impl("circle", width, height, Some(N64::from(1.0)), fill, body) } fn ellipse_impl( name: &str, width: Option, height: Option, - aspect: Option>, + aspect: Option, fill: Option, body: TemplateValue, ) -> Value { -- cgit v1.2.3