Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Olena
olena
Commits
6e6baf62
Commit
6e6baf62
authored
Aug 27, 2013
by
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
milena/ChangeLog
View file @
6e6baf62
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.
milena/mln/algebra/quat.hh
View file @
6e6baf62
// 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.14159265358979323846
f
;
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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment