- or download this
. . . x * * * (row 2, bit value 4)
. . . * * * * (row 1, bit value 2)
. * * . . . * (row 0, bit value 1)
- or download this
# swap rows 0 and 1
. x . . * * *
...
. * . . * * *
$args = [ 1, 1, 2, 0, 0, 2, 0, 1 ]
$height = 2, $v = 1
- or download this
# .. and now swap rows 1 and 2
. . . . * * *
...
. * * * . . *
$args = [ 1, 1, 0, 2, 2, 0, 0, 1 ]
$height = 1, $v = 1
- or download this
sub rearrange {
my($dim, $height, $v, $args) = @_;
...
}
($bitmap[$height], [ @$args[ @vmap ] ]);
}