summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/asymptote/plain.asy
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/asymptote/plain.asy')
-rw-r--r--Master/texmf-dist/asymptote/plain.asy8
1 files changed, 7 insertions, 1 deletions
diff --git a/Master/texmf-dist/asymptote/plain.asy b/Master/texmf-dist/asymptote/plain.asy
index 365aad02c74..cac6aa07222 100644
--- a/Master/texmf-dist/asymptote/plain.asy
+++ b/Master/texmf-dist/asymptote/plain.asy
@@ -150,7 +150,13 @@ void initdefaults()
// Return the sequence n,...,m
int[] sequence(int n, int m)
{
- return sequence(new int(int x){return x;},m-n+1)+n;
+ return n+sequence(m-n+1);
+}
+
+// Return the sequence n,...,m skipping by skip
+int[] sequence(int n, int m, int skip)
+{
+ return n+skip*sequence((m-n)#skip+1);
}
int[] reverse(int n) {return sequence(new int(int x){return n-1-x;},n);}