Hilbert curve: Difference between revisions

Content added Content deleted
m (→‎{{header|Sidef}}: minor update)
m (→‎{{header|Sidef}}: updated code: use round() instead of int())
Line 2,514: Line 2,514:
primitive => 'line',
primitive => 'line',
points => join(' ',
points => join(' ',
int(x * scale + xoff),
round(x * scale + xoff),
int(y * scale + yoff),
round(y * scale + yoff),
int(newx * scale + xoff),
round(newx * scale + xoff),
int(newy * scale + yoff),
round(newy * scale + yoff),
),
),
stroke => color,
stroke => color,
Line 2,596: Line 2,596:
table{c}.run
table{c}.run
}
}
elsif (c.contains(/^[[:upper:]]\z/)) {
elsif (c.is_uppercase) {
turtle.forward(len)
turtle.forward(len)
}
}