Browse Source

Update credits and changelog, minor cleanup.

pull/403/head
Vladimír Vondruš 7 years ago
parent
commit
15e5bfa09e
  1. 5
      doc/changelog.dox
  2. 2
      doc/credits.dox
  3. 10
      src/Magnum/Math/Quaternion.h
  4. 4
      src/Magnum/Math/Test/QuaternionTest.cpp

5
doc/changelog.dox

@ -53,6 +53,11 @@ See also:
and @gl_extension{NV,fragment_shader_barycentric} desktop / ES extensions.
These add only shading language features.
@subsubsection changelog-latest-new-math Math library
- Added @ref Math::Quaternion::toEuler() and documented how to convert Euler
angles to a quaternion (see [mosra/magnum#397](https://github.com/mosra/magnum/pull/397))
@subsubsection changelog-latest-new-platform Platform libraries
- Cursor management using @ref Platform::Sdl2Application::setCursor(),

2
doc/credits.dox

@ -150,7 +150,7 @@ Are the below lists missing your name or something's wrong?
WebGL 2 build fixes
- **Marco Melorio** ([\@Melix19](https://github.com/Melix19)) --- iOS test
updates and fixes, cursor management in @ref Platform::Sdl2Application and
@ref Platform::GlfwApplication, doc fixes
@ref Platform::GlfwApplication, Math library additions and doc fixes
- **Max Schwarz** ([\@xqms](https://github.com/xqms)) --- `Any*` plugin
improvements, fixes in the @ref GL library
- **Michael Tao** ([\@mtao](https://github.com/mtao)) --- Gentoo build fixes

10
src/Magnum/Math/Quaternion.h

@ -401,14 +401,14 @@ template<class T> class Quaternion {
/**
* @brief Convert to an euler vector
* @m_since_latest
*
* Expects that the quaternion is normalized and that the values
* are combined in ZYX order.
* The returned vector of radians is in XYZ order.
* @see @ref rotation(), @ref DualQuaternion::rotation()
* To convert the euler angles back to the Quaternion you can use:
* Expects that the quaternion is normalized. Returs the angles in an
* XYZ order, you can combine them back to a quaternion like this:
*
* @snippet MagnumMath.cpp Quaternion-fromEuler
*
* @see @ref rotation(), @ref DualQuaternion::rotation()
*/
Vector3<Rad<T>> toEuler() const;

4
src/Magnum/Math/Test/QuaternionTest.cpp

@ -559,7 +559,7 @@ void QuaternionTest::matrixNotOrthogonal() {
}
void QuaternionTest::euler() {
Quaternion a = Quaternion({0.35f, 0.134f, 0.37f}, 0.02f).normalized();
Quaternion a = Quaternion{{0.35f, 0.134f, 0.37f}, 0.02f}.normalized();
Math::Vector3<Rad> b{1.59867_radf, -1.15100_radf, 1.85697_radf};
CORRADE_COMPARE(a.toEuler(), b);
@ -568,7 +568,7 @@ void QuaternionTest::euler() {
Quaternion::rotation(b.y(), Vector3::yAxis())*
Quaternion::rotation(b.x(), Vector3::xAxis()));
Quaternion a2 = Quaternion({-0.624252f, -0.331868f, -0.624468f}, 0.331983f);
Quaternion a2{{-0.624252f, -0.331868f, -0.624468f}, 0.331983f};
Math::Vector3<Rad> b2{0.0_radf, -1.57045_radf, -2.16434_radf};
CORRADE_COMPARE(a2.toEuler(), b2);

Loading…
Cancel
Save