This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<u.h> | |
#include<libc.h> | |
#define MAX(a, b) ((a) > (b) ? (a) : (b)) | |
/* Hilbert curve functions (from Wikipedia) */ | |
/* rotate/flip a quadrant appropriately */ | |
void rot(int n, int *x, int *y, int rx, int ry) | |
{ |