Skip to content
Snippets Groups Projects

Interval: handle negative multiplication

1 file
+ 5
0
Compare changes
  • Side-by-side
  • Inline
@@ -63,6 +63,11 @@ public:
@@ -63,6 +63,11 @@ public:
{
{
data_[0] *= c;
data_[0] *= c;
data_[1] *= c;
data_[1] *= c;
 
 
// swap if multiplication with negative number
 
if ( c < 0.0 )
 
std::swap(data_[0],data_[1]);
 
return *this;
return *this;
}
}
Loading