Commit 9798a844 authored by Guillaume Lazzara's avatar Guillaume Lazzara
Browse files

Update use of math::round.

	* mln/convert/impl/from_double_to_value.hh,
	* mln/convert/impl/from_float_to_value.hh: Here.
parent 0742e585
2013-03-08 Guillaume Lazzara <z@lrde.epita.fr>
Update use of math::round.
* mln/convert/impl/from_double_to_value.hh,
* mln/convert/impl/from_float_to_value.hh: Here.
2013-03-08 Guillaume Lazzara <z@lrde.epita.fr>
 
* doc/.gitignore: exclude .dox files.
// Copyright (C) 2009, 2010, 2011, 2012 EPITA Research and Development
// Laboratory (LRDE)
// Copyright (C) 2009, 2010, 2011, 2012, 2013 EPITA Research and
// Development Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -72,7 +72,7 @@ namespace mln
from_double_to_value(const double& from,
mln::value::Integer<V>& to)
{
exact(to) = math::round<V>()(from);
exact(to) = math::round<V>(from);
}
// Case 2:
......@@ -134,7 +134,7 @@ namespace mln
from_to_(const double& from, unsigned& to)
{
mln_precondition(from >= 0);
to = math::round<unsigned>()(from);
to = math::round<unsigned>(from);
}
// double -> int
......@@ -142,7 +142,7 @@ namespace mln
void
from_to_(const double& from, int& to)
{
to = math::round<int>()(from);
to = math::round<int>(from);
}
# endif // ! MLN_INCLUDE_ONLY
......
// Copyright (C) 2008, 2009, 2010, 2011, 2012 EPITA Research and
// Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013 EPITA Research and
// Development Laboratory (LRDE)
//
// This file is part of Olena.
......@@ -75,7 +75,7 @@ namespace mln
from_float_to_value(const float& from,
mln::value::Integer<V>& to)
{
exact(to) = math::round<V>()(from);
exact(to) = math::round<V>(from);
}
// Case 2:
......@@ -137,7 +137,7 @@ namespace mln
from_to_(const float& from, unsigned& to)
{
mln_precondition(from >= 0);
to = math::round<unsigned>()(from);
to = math::round<unsigned>(from);
}
// float-> int
......@@ -145,7 +145,7 @@ namespace mln
void
from_to_(const float& from, int& to)
{
to = math::round<int>()(from);
to = math::round<int>(from);
}
// float-> short
......@@ -153,7 +153,7 @@ namespace mln
void
from_to_(const float& from, short& to)
{
to = math::round<short>()(from);
to = math::round<short>(from);
}
......
Supports Markdown
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