From: Ian Jackson Date: Sun, 7 Nov 2010 02:08:17 +0000 (+0000) Subject: slopecalc: support 1:xxx slopes X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=a1df3adbe93bd3ee7b2e66bb6d71ab131924479f;p=trains.git slopecalc: support 1:xxx slopes --- diff --git a/layout/slopecalc b/layout/slopecalc index 40eb543..3b7d6c0 100755 --- a/layout/slopecalc +++ b/layout/slopecalc @@ -145,6 +145,8 @@ sub parse_args () { arg_item(H, $1); } elsif (m/^([-+]?$numre)\%$/o) { arg_item(S, $1 * 0.01); + } elsif (m/^([-+]?1)\:($numre)$/o) { + arg_item(S, $1 / $2); } elsif (m/^\@([-+]?$numre)$/o) { if (defined $absoffset) { arg_item(L, $1 + $absoffset);