summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-09-12 10:59:09 +0200
committerStanislaw Halik <sthalik@misaki.pl>2023-09-12 10:59:09 +0200
commit26943167ab61a69edf42fe1adefe395cbc57962d (patch)
treef9cf19142c7733891fc1d1d74c134b3048c52dd2
parentfa58acb73e55103defc5153f128cdcf0bbf53420 (diff)
src: don't pollute main namespace
-rw-r--r--src/rotation.inl10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/rotation.inl b/src/rotation.inl
index 4ddf1153..b4d2d22b 100644
--- a/src/rotation.inl
+++ b/src/rotation.inl
@@ -23,17 +23,15 @@ constexpr Triple<Vector2b, Vector2ub, Vector2ub> rotation_symmetry(rotation r)
return sym;
}
-template<typename T> using Vec2 = Math::Vector2<T>;
-
template<typename T>
-constexpr Vec2<T> rotate_point(Vec2<T> rect, rotation r_old, rotation r_new)
+constexpr Math::Vector2<T> rotate_point(Math::Vector2<T> rect, rotation r_old, rotation r_new)
{
fm_assert(r_old < rotation_COUNT && r_new < rotation_COUNT);
auto [m_offset0, i_offset0, i_size0] = rotation_symmetry(r_old);
- auto offset0_ = rect * Vec2<T>(m_offset0);
- auto offset_n = Vec2<T>(offset0_[i_offset0[0]], offset0_[i_offset0[1]]);
+ auto offset0_ = rect * Math::Vector2<T>(m_offset0);
+ auto offset_n = Math::Vector2<T>(offset0_[i_offset0[0]], offset0_[i_offset0[1]]);
auto [m_offset1, i_offset1, i_size1] = rotation_symmetry(r_new);
- return Vec2<T>{offset_n[i_offset1[0]], offset_n[i_offset1[1]]}*Vec2<T>{m_offset1};
+ return Math::Vector2<T>{offset_n[i_offset1[0]], offset_n[i_offset1[1]]}*Math::Vector2<T>{m_offset1};
}
constexpr Vector2ub rotate_size(Vector2ub size0, rotation r_old, rotation r_new)