I completely overlooked the fact that I treated x/y coordinates as having
top-left be 0,0 when in the original values are written out starting in
the bottom right, to a format (netpbm / *.ppm) that also takes values as
starting in the top-left. So in order to be able to write "backwards"
(probably to save 3 characters in the two for-loops) aek intentionally
calculated his "left" vector backwards, i.e. rotated by 90 degrees to the
right. And via the cross-product that means up will be down.
But now left shall be left, and up shall be up, always.
(Oh and also I reverted modifications to the original source in min.c
and moved it to min.cpp so that gcc hopefully won't complain anymore)