From bffe38efe8180fc2d16947e9cb4afd85fdb76cd1 Mon Sep 17 00:00:00 2001 From: Andinus Date: Wed, 3 Nov 2021 21:34:23 +0530 Subject: Fix excess space calculation Earlier we assumed that rows == columns. --- lib/Fornax/CLI.rakumod | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Fornax/CLI.rakumod b/lib/Fornax/CLI.rakumod index 3918fc1..cdc910d 100644 --- a/lib/Fornax/CLI.rakumod +++ b/lib/Fornax/CLI.rakumod @@ -54,10 +54,10 @@ multi sub MAIN( # Consider width if cells with dimension (width * width) fit # within the canvas, otherwise consider the height. if (%cell * %meta) < %CANVAS { - %excess = abs %CANVAS - %CANVAS; + %excess = %CANVAS - (%cell * %meta); $side = %cell; } else { - %excess = abs %CANVAS - %CANVAS; + %excess = %CANVAS - (%cell * %meta); $side = %cell; } -- cgit 1.4.1-2-gfad0