Rotation<Frame, Frame> Exp(Bivector<quantities::Angle, Frame> const& exponent) { quantities::Angle const angle = exponent.Norm(); if (angle == quantities::Angle()) { return Rotation<Frame, Frame>::Identity(); } else { return Rotation<Frame, Frame>(angle, exponent); } }
quantities::Angle AngleBetween(Bivector<LScalar, Frame> const& v, Bivector<RScalar, Frame> const& w) { auto const v_norm_w = v * w.Norm(); auto const w_norm_v = w * v.Norm(); return 2 * ArcTan((v_norm_w - w_norm_v).Norm(), (v_norm_w + w_norm_v).Norm()); }
Rotation<Frame, Frame> Exp(Bivector<quantities::Angle, Frame> const& exponent) { return Rotation<Frame, Frame>(exponent.Norm(), exponent); }