Commit f2432865 authored by Henry Weller's avatar Henry Weller
Browse files

Scalar: Documented 'posPart' and 'negPart'

parent 83c7e976
......@@ -139,12 +139,16 @@ inline Scalar neg(const Scalar s)
}
//- Return the positive part of s
inline Scalar posPart(const Scalar s)
{
return (s > 0)? s: 0;
}
//- Return the negative part of s.
// Note: this function returns the actual negative part of s as a
// negative number and does not change the sign
inline Scalar negPart(const Scalar s)
{
return (s < 0)? s: 0;
......
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