summaryrefslogtreecommitdiffhomepage
path: root/editor/camera.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-03-19 09:03:59 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-03-19 14:32:18 +0100
commit332745db6c2ecaa3a81f1b337be1a0bcae7511b9 (patch)
treef7fe0e2f2522ce58b51149c6a87b53fba682aa93 /editor/camera.cpp
parent151e6911a8aa56749edbbf0c15ab04752d96c2f3 (diff)
ddd
rename foo_ -> fooʹ
Diffstat (limited to 'editor/camera.cpp')
-rw-r--r--editor/camera.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/editor/camera.cpp b/editor/camera.cpp
index 429dbdba..4bd316e1 100644
--- a/editor/camera.cpp
+++ b/editor/camera.cpp
@@ -113,8 +113,8 @@ object_id app::get_object_colliding_with_cursor()
Vector2 min(rect.m_min[0], rect.m_min[1]), max(rect.m_max[0], rect.m_max[1]);
if (t0 >= min && t0 <= max)
{
- if (auto eʹ = world.find_object(x.data);
- eʹ && Vector2ui(eʹ->bbox_size).product() != 0)
+ if (auto e_ = world.find_object(x.data);
+ e_ && Vector2ui(e_->bbox_size).product() != 0)
{
ret = x.data;
return false;
@@ -142,9 +142,9 @@ void app::update_cursor_tile(const Optional<Vector2i>& pixel)
const auto tile_ = Vector2(M->pixel_to_tile_(Vector2d(*pixel)));
const auto curchunk = Vector2(tile.chunk());
- const auto subpixel_ = Math::fmod(tile_, 1.f);
- auto subpixel = TILE_SIZE2 * Vector2(curchunk.x() < 0 ? 1 + subpixel_.x() : subpixel_.x(),
- curchunk.y() < 0 ? 1 + subpixel_.y() : subpixel_.y());
+ const auto subpixelʹ = Math::fmod(tile_, 1.f);
+ auto subpixel = TILE_SIZE2 * Vector2(curchunk.x() < 0 ? 1 + subpixelʹ.x() : subpixelʹ.x(),
+ curchunk.y() < 0 ? 1 + subpixelʹ.y() : subpixelʹ.y());
constexpr auto half_tile = Vector2(iTILE_SIZE2/2);
subpixel -= half_tile;
subpixel = Math::clamp(Math::round(subpixel), -half_tile, half_tile-Vector2{1.f});