Commit 6e6baf62 authored by Roland Levillain's avatar Roland Levillain
Browse files

Use mln::math::pi instead of a local definition in Milena.

	* mln/algebra/quat.hh (mln::algebra::quat::set_unit): Here.
parent 42bdd443
2013-08-27 Roland Levillain <roland@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@lrde.epita.fr>
 
Set mln::math::pi to 20 decimals.
// 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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment