bool Entity::TileLock(const math::Vector<int> &tileSize) const {
// TODO: change position to point to the top-left corner of a tile
Vector<int> tilePosition(ToInt(position));
- return (tilePosition.X() % tileSize.X() == 0) && (tilePosition.Y() % tileSize.Y() == 0);
+ return tilePosition % tileSize == Vector<int>();
}
public:
int Int() const { return IntPart() * Sigma(); }
int Sigma() const {
- if (IntPart() == 0 && FracPart() == 0) {
+ if (RawInt() == 0) {
return 0;
} else if (SignPart() == 0) {
return 1;