Last active
October 4, 2018 12:28
-
-
Save h0hmj/5596ca1b581e4432842c4dff935cbeda to your computer and use it in GitHub Desktop.
3d miniproject1 mask
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
int mask[9][9]; | |
void mask_gen_mag() { | |
int i, j; | |
for (i = 0; i < 9; i++) { | |
for (int j = 0; j < 9; ++j) { | |
if (j == 0)mask[i][j] = (9 - i) % 9; | |
else if (j == 3)mask[i][j] = (15 - i) % 9; | |
else if (j == 6)mask[i][j] = (12 - i) % 9; | |
else mask[i][j] = (mask[i][j - 1] + 1) % 9; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment