I stumble about a Math Problem for calculating a Position on a dynamic tile-map.
So i got a List of Tile Entities. Every Tile got his one unique Index Value and i have to set the parameters for Map Height and Width.
Example A Map X = 3 Y = 4
Example B Map X = 4 Y = 3
To get the X Position Value of Tile E6 i know i have to use Map.X % 6
.
But i'm not sure how to get the Y Position of the Tile by his Index. %
in this case stands for the modulo operation (c#).
Is there a name for such an calculation? Does somebody already know the answer?