chiark / gitweb /
slopecalc: support 1:xxx slopes
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sun, 7 Nov 2010 02:08:17 +0000 (02:08 +0000)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sun, 7 Nov 2010 02:08:17 +0000 (02:08 +0000)
layout/slopecalc

index 40eb5436f93e35df58edf480f3d64d762a7d1cfe..3b7d6c01a8903152a74a52f69c73b183c19ebc5c 100755 (executable)
@@ -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);