Comment detail

循環関数 (Nested Flatten)

PostScript です。 50% のカバレッジを目指しているのですが、なかなか...

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
!PS

/modular { % n low high  modular  result
    1 index sub 1 add 3 -1 roll 1 index mod
    dup 0 lt { add } { exch pop } ifelse add
} bind def

% --- Test Code ---
0 100 200 modular =
50 100 200 modular =
100 100 200 modular =
101 100 200 modular =
-1 100 200 modular =
1 -5 200 modular =
-500 -5 -1 modular =

Index

Feed

Other

Link

Pathtraq

loading...