Answers for "get 2d coord from 1d array"

0

get 2d coord from 1d array

x = i % width;    // % is the "modulo operator", the remainder of i / width;
y = i / width;    // where "/" is an integer division
Posted by: Guest on May-02-2022

Browse Popular Code Answers by Language