diff options
Diffstat (limited to 'src/rotation.inl')
-rw-r--r-- | src/rotation.inl | 10 |
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) |