Given this author's comment:
This is just a Java Game, and all I'm testing for is if the Player's x coordinate, (ax), and the y coordinate, (ay), are in line with the tiles, as this is a tile-based game. If they're not in line with the tiles, then the coordinates are increased or decreased so you are put in line with the tiles.
The way to do that would be something along these lines:
double tileSize = 10;
double ax = 25;
double vectorX = Math.floor(ax/tileSize + 0.5) - ax/tileSize;
This will give you a vector in range of -1..1 which you can multiply by speed or do whatever you want to decide the movement. For example:
ax = ax + Math.ceil(vectorX*speed);
Same goes with ay axis. Also, notice that there are doubles in my formula so apply appropriate casts if needed.