#ifndef OPENMW_MWWORLD_CELLUTILS_H #define OPENMW_MWWORLD_CELLUTILS_H #include #include #include namespace MWWorld { inline ESM::CellId::CellIndex positionToIndex(float x, float y) { return { static_cast(std::floor(x / Constants::CellSizeInUnits)), static_cast(std::floor(y / Constants::CellSizeInUnits)) }; } } #endif