ref/main.c
void rot(int n, int *x, int *y, int rx, int ry) {
    if (ry == 0) {
        if (rx == 1) {
            *x = n-1 - *x;
            *y = n-1 - *y;
        }
        // Swap x and y
        int t  = *x;
        *x = *y;
        *y = t;
    }
}
// rotate/flip a quadrant appropriately
rotate/flip a quadrant appropriately
rotate / flip a quadrant appropriately
void rot(int n, int *x, int *y, int rx, int ry) {
    if (ry == 0) {
        if (rx == 1) {
            *x = n-1 - *x;
            *y = n-1 - *y;
        }
        int t  = *x;
        *x = *y;
        *y = t;
    }
}
void rot ( int n , int * x , int * y , int rx , int ry ) { if ( ry == 0 ) { if ( rx == 1 ) { * x = n - 1 - * x ; * y = n - 1 - * y ; } int t = * x ; * x = * y ; * y = t ; } }
rotate/flip a quadrant appropriately
rotate / flip a quadrant appropriately
// Swap x and y