Skip to content
Snippets Groups Projects
Commit 13c861ab authored by Timo Koch's avatar Timo Koch
Browse files

[math] Make sign constexpr and noexcept

parent 150b67f8
No related branches found
No related tags found
1 merge request!807Feature/improve math functions
...@@ -501,7 +501,7 @@ Scalar antoine(Scalar temperature, ...@@ -501,7 +501,7 @@ Scalar antoine(Scalar temperature,
* Returns 0 if the argument is zero. * Returns 0 if the argument is zero.
*/ */
template<class ValueType> template<class ValueType>
int sign(const ValueType& value) constexpr int sign(const ValueType& value) noexcept
{ {
return (ValueType(0) < value) - (value < ValueType(0)); return (ValueType(0) < value) - (value < ValueType(0));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment