The book Social isometric games , on page 53, describes a method for determining a tile by mouse cardinates. Everything works, but it is not clear by what principle it is calculated. Can someone explain this algorithm in detail? Can references to the formula are available. Or at least in what field of science to look for it.
An example of a piece of code that interests you:
var col = (e.clientY - gridOffsetY) * 2; //??? col = ((gridOffsetX + col) - e.clientX) / 2; //??? var row = ((e.clientX + col) - tile.height) - gridOffsetX; //???