plex) {
    Base::normalize();
  }

  /**
   * \brief Constructor from std::complex
   *
   * \pre complex number must not be zero
   */
  inline explicit
  SO2Group(const std::complex<Scalar> & complex)
    : unit_complex_(complex.real(), complex.imag()) {
    Base::normalize();
  }

  /**
   * \brief Constructor from an angle
   */
  inline explicit
  SO2Group(Scalar theta) {
    unit_complex_nonconst() = SO2Group<Scalar>::exp(theta).unit_complex();
  }

  /**
   * \brief Accessor of unit complex number
   *
   * No direct write access is given to ensure the complex number stays
   * normalized.
   */
  EIGEN_STRONG_INLINE
  ConstComplexReference unit_complex() const {
    return unit_complex_;
  }

protected:
  // Mutator of complex number is protected so users are hampered
  // from setting non-unit complex numbers.
  EIGEN_STRONG_INLINE
  ComplexReference unit_complex_nonconst() {
    return unit_complex_;
  }

  static bool isNearZero(const Scalar & real, const Scalar & imag) {
    return (real*real + imag*imag < SophusConstants<Scalar>::epsilon());
  }

  Matrix<Scalar,2,1> unit_complex_;
};

} // end namespace


namespace Eigen {
/**
 * \brief Specialisation of Eigen::Map for SO2GroupBase
 *
 * Allows us to wrap SO2 Objects around POD array
 * (e.g. external c style complex number)
 */
template<typename _Scalar, int _Options>
class Map<Sophus::SO2Group<_Scalar>, _Options>
    : public Sophus::SO2GroupBase<Map<Sophus::SO2Group<_Scalar>, _Options> > {
  typedef Sophus::SO2GroupBase<Map<Sophus::SO2Group<_Scalar>, _Options> > Base;

public:
  /** \brief scalar type */
  typedef typename internal::traits<Map>::Scalar Scalar;
  /** \brief complex number reference type */
  typedef typename internal::traits<Map>::ComplexType & ComplexReference;
  /** \brief complex number const reference type */
  typedef const typename internal::traits<Map>::ComplexType &
  ConstComplexReference;

  /** \brief degree of freedom of group */
  static const int DoF = Base::DoF;
  /** \brief number of internal parameters used */
  