I'm trying to flip a quad tree about the vertical axis recursively, but without using a particular PL. In which case I've written the following, but I'm 100% it's not actually good, and I can't quite sure I understand it as well.
flip(quadtree) {
if (singleNode)
return quadtree
else return formQuadTree(flip(NW(quadtree)), flip(NE(quadtree)), flip(SW(quadtree)), flip(SE(quadtree)))
Any suggestions?