First:
double playerX = Math.floor(Minecraft.getMinecraft().thePlayer.posX);
The floor function maps a number to its largest preceeding integer (e.g. 29.99 -> 29.00), so you will have a value ending with .00.
Second:
if (coordinate > 0) {
float v = coordinate - .99;
if (x = (int) x) {
// the player's positive coordinate ends with .99
}
} else {
float v = coordinate + .99;
if (x = (int) x) {
// the player's negative coordinate ends with .99
}
}
Note: if the coordinates have more than two digits after the decimal point, this code will mess up. If that is the case, be sure to truncate the floats.