4
4
// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>
6
// Eigen is free software; you can redistribute it and/or
7
// modify it under the terms of the GNU Lesser General Public
8
// License as published by the Free Software Foundation; either
9
// version 3 of the License, or (at your option) any later version.
11
// Alternatively, you can redistribute it and/or
12
// modify it under the terms of the GNU General Public License as
13
// published by the Free Software Foundation; either version 2 of
14
// the License, or (at your option) any later version.
16
// Eigen is distributed in the hope that it will be useful, but WITHOUT ANY
17
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18
// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the
19
// GNU General Public License for more details.
21
// You should have received a copy of the GNU Lesser General Public
22
// License and a copy of the GNU General Public License along with
23
// Eigen. If not, see <http://www.gnu.org/licenses/>.
6
// This Source Code Form is subject to the terms of the Mozilla
7
// Public License v. 2.0. If a copy of the MPL was not distributed
8
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
25
10
#ifndef EIGEN_ROTATION2D_H
26
11
#define EIGEN_ROTATION2D_H
28
15
/** \geometry_module \ingroup Geometry_Module
30
17
* \class Rotation2D
90
77
/** Concatenates two rotations */
91
78
inline Rotation2D& operator*=(const Rotation2D& other)
92
{ return m_angle += other.m_angle; return *this; }
79
{ m_angle += other.m_angle; return *this; }
94
81
/** Applies the rotation to a 2D vector */
95
82
Vector2 operator* (const Vector2& vec) const
121
108
m_angle = Scalar(other.angle());
124
inline static Rotation2D Identity() { return Rotation2D(0); }
111
static inline Rotation2D Identity() { return Rotation2D(0); }
126
113
/** \returns \c true if \c *this is approximately equal to \a other, within the precision
127
114
* determined by \a prec.