ankas Yes. floor(x) rounds down to the nearest whole number.
floor(1.7) = 1
floor(1.7 * 10) = 17
floor(70 / 64) = 1
floor(70 / 64) * 64 = 64
floor(137 / 64) * 64 = 128
Divide first so that it is rounding based on that number, then round. Then multiply to get back to the original scale.
You can also use mod(x, y) which returns the remainder of a division.
scrollx = player.x - mod(player.X, 64)
This will round down to multiples of 64. The mod() function returns what's left after dividing (the remainder), which is what we want to get rid of.
If you are using rooms or what have you, and need to have the camera be in a set position instead of at intervals, you can place objects which on collision move the camera to its center.