* mln/algebra/quat.hh (mln::algebra::quat::set_unit): Here.
---
milena/ChangeLog | 6 ++++++
milena/mln/algebra/quat.hh | 9 +++------
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 45d0a38..77442f1 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,11 @@
2013-08-27 Roland Levillain <roland(a)lrde.epita.fr>
+ Use mln::math::pi instead of a local definition in Milena.
+
+ * mln/algebra/quat.hh (mln::algebra::quat::set_unit): Here.
+
+2013-08-27 Roland Levillain <roland(a)lrde.epita.fr>
+
Set mln::math::pi to 20 decimals.
* mln/math/pi.hh (mln::math::pi): Here.
diff --git a/milena/mln/algebra/quat.hh b/milena/mln/algebra/quat.hh
index 2ba89e4..a433725 100644
--- a/milena/mln/algebra/quat.hh
+++ b/milena/mln/algebra/quat.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2007, 2008, 2009, 2012 EPITA Research and Development
+// Copyright (C) 2007, 2008, 2009, 2012, 2013 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
@@ -462,12 +462,9 @@ namespace mln
inline
void quat::set_unit(float theta, const algebra::vec<3,T>& uv)
{
- static const float pi = 3.14159265358979323846f;
-
- mln_precondition(theta > - pi - mln_epsilon(float)
- && theta < pi + mln_epsilon(float));
+ mln_precondition(theta > - float(math::pi) - mln_epsilon(float)
+ && theta < float(math::pi) + mln_epsilon(float));
mln_precondition(about_equal(norm::l2(uv), 1.f));
- (void) pi;
this->v_[0] = std::cos(theta);
float sint = std::sin(theta);
--
1.7.10.4
Show replies by date