I don't understand "MOD" function.

BlitzMax Forums/BlitzMax Beginners Area/I don't understand "MOD" function.

i use the mod function for tiled maps
ie.

tx = (mousex() - (mousex() mod tilewidth)) / tilewidth
ty = (mousey() - (mousey() mod tileheight)) / tileheight

if mousehit(1) then map[tx, ty] = placetile