Template:E 2D utilities: Difference between revisions

no edit summary
m (Template template)
No edit summary
 
Line 1:
<noinclude>Some [[Category:E]] library code for the [[Spiral]] and [[Zig Zag]] tasks. Perhaps ought to be put into generally available E data structure/math libraries.
 
{{template}}</noinclude><langsyntaxhighlight lang="e">/** Missing scalar multiplication, but we don't need it. */
def makeVector2(x, y) {
return def vector {
Line 26:
to put(r, c, v) { storage[r * cols + c] := v }
}
}</langsyntaxhighlight>