diff options
author | Andinus <andinus@nand.sh> | 2021-11-03 21:34:23 +0530 |
---|---|---|
committer | Andinus <andinus@nand.sh> | 2021-11-03 21:34:23 +0530 |
commit | bffe38efe8180fc2d16947e9cb4afd85fdb76cd1 (patch) | |
tree | 0625a20f1f87d1907fe399600c544b1be8d3db89 /lib/Fornax/CLI.rakumod | |
parent | e1e90993013b15b63409859fba8476de4da6924d (diff) | |
download | fornax-bffe38efe8180fc2d16947e9cb4afd85fdb76cd1.tar.gz |
Fix excess space calculation
Earlier we assumed that rows == columns.
Diffstat (limited to 'lib/Fornax/CLI.rakumod')
-rw-r--r-- | lib/Fornax/CLI.rakumod | 4 |
1 files 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<width> * %meta<rows>) < %CANVAS<height> { - %excess<height> = abs %CANVAS<width> - %CANVAS<height>; + %excess<height> = %CANVAS<height> - (%cell<width> * %meta<rows>); $side = %cell<width>; } else { - %excess<width> = abs %CANVAS<width> - %CANVAS<height>; + %excess<width> = %CANVAS<width> - (%cell<height> * %meta<cols>); $side = %cell<height>; } |