I made this method
+ (CGFloat) round: (CGFloat)f {
int a = f;
CGFloat b = a;
return b;
}
It works as expected but it only rounds down. And if it's a negative number it still rounds down.
This was just a quick method I made, it isn't very important that it rounds correctly, I just made it to round the camera's x and y values for my game.
Is this method okay? Is it fast? Or is there a better solution?