From f91ff6625fbc4d28b2fbe637c3ee8bc0995def9c Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Wed, 8 Feb 2017 16:37:59 +0000 Subject: [PATCH] No need for requiring int position here. --- src/worldgrid.cpp | 4 ++-- src/worldgrid.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/worldgrid.cpp b/src/worldgrid.cpp index 6195993..8f11da0 100644 --- a/src/worldgrid.cpp +++ b/src/worldgrid.cpp @@ -133,10 +133,10 @@ namespace curry { return parWorld.tile_size() * parWorld.world_size(); } - vec2us pixel_to_world_tile (const WorldGrid& parWorld, const vec2i& parPos) { + vec2us pixel_to_world_tile (const WorldGrid& parWorld, const vec2f& parPos) { assert(position_is_on_map(parWorld, parPos)); return vector_cast( - parPos / vector_cast(parWorld.tile_size()) + parPos / vector_cast(parWorld.tile_size()) ); } diff --git a/src/worldgrid.hpp b/src/worldgrid.hpp index dc67973..00e08c7 100644 --- a/src/worldgrid.hpp +++ b/src/worldgrid.hpp @@ -61,6 +61,6 @@ namespace curry { }; vec2i world_size_pixel (const WorldGrid& parWorld); - vec2us pixel_to_world_tile (const WorldGrid& parWorld, const vec2i& parPos); + vec2us pixel_to_world_tile (const WorldGrid& parWorld, const vec2f& parPos); bool position_is_on_map (const WorldGrid& parWorld, const vec2i& parPos); } //namespace curry