From 26943167ab61a69edf42fe1adefe395cbc57962d Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 12 Sep 2023 10:59:09 +0200 Subject: src: don't pollute main namespace --- src/rotation.inl | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src') 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 rotation_symmetry(rotation r) return sym; } -template using Vec2 = Math::Vector2; - template -constexpr Vec2 rotate_point(Vec2 rect, rotation r_old, rotation r_new) +constexpr Math::Vector2 rotate_point(Math::Vector2 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(m_offset0); - auto offset_n = Vec2(offset0_[i_offset0[0]], offset0_[i_offset0[1]]); + auto offset0_ = rect * Math::Vector2(m_offset0); + auto offset_n = Math::Vector2(offset0_[i_offset0[0]], offset0_[i_offset0[1]]); auto [m_offset1, i_offset1, i_size1] = rotation_symmetry(r_new); - return Vec2{offset_n[i_offset1[0]], offset_n[i_offset1[1]]}*Vec2{m_offset1}; + return Math::Vector2{offset_n[i_offset1[0]], offset_n[i_offset1[1]]}*Math::Vector2{m_offset1}; } constexpr Vector2ub rotate_size(Vector2ub size0, rotation r_old, rotation r_new) -- cgit v1.2.3