Skip to content

Commit

Permalink
Making API consistent for:
Browse files Browse the repository at this point in the history
1. Angle.cc

fix gazebosim#301

Signed-off-by: Akshat Pandya <[email protected]>
  • Loading branch information
akshatpandya committed Dec 17, 2021
1 parent e0cc08f commit 809586e
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions src/Angle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,25 @@ Angle::Angle(const double _radian)
}

//////////////////////////////////////////////////
void Angle::Radian(double _radian)
void Angle::Radian(const double _radian)
{
this->value = _radian;
}

//////////////////////////////////////////////////
void Angle::SetRadian(double _radian)
void Angle::SetRadian(const double _radian)
{
this->value = _radian;
}

//////////////////////////////////////////////////
void Angle::Degree(double _degree)
void Angle::Degree(const double _degree)
{
this->value = _degree * IGN_PI / 180.0;
}

//////////////////////////////////////////////////
void Angle::SetDegree(double _degree)
void Angle::SetDegree(const double _degree)
{
this->value = _degree * IGN_PI / 180.0;
}
Expand Down Expand Up @@ -79,91 +79,91 @@ Angle Angle::Normalized() const
}

//////////////////////////////////////////////////
Angle Angle::operator-(const Angle &angle) const
Angle Angle::operator-(const Angle &_angle) const
{
return Angle(this->value - angle.value);
return Angle(this->value - _angle.value);
}

//////////////////////////////////////////////////
Angle Angle::operator+(const Angle &angle) const
Angle Angle::operator+(const Angle &_angle) const
{
return Angle(this->value + angle.value);
return Angle(this->value + _angle.value);
}

//////////////////////////////////////////////////
Angle Angle::operator*(const Angle &angle) const
Angle Angle::operator*(const Angle &_angle) const
{
return Angle(this->value * angle.value);
return Angle(this->value * _angle.value);
}

//////////////////////////////////////////////////
Angle Angle::operator/(const Angle &angle) const
Angle Angle::operator/(const Angle &_angle) const
{
return Angle(this->value / angle.value);
return Angle(this->value / _angle.value);
}

//////////////////////////////////////////////////
Angle Angle::operator-=(const Angle &angle)
Angle Angle::operator-=(const Angle &_angle)
{
this->value -= angle.value;
this->value -= _angle.value;
return *this;
}

//////////////////////////////////////////////////
Angle Angle::operator+=(const Angle &angle)
Angle Angle::operator+=(const Angle &_angle)
{
this->value += angle.value;
this->value += _angle.value;
return *this;
}

//////////////////////////////////////////////////
Angle Angle::operator*=(const Angle &angle)
Angle Angle::operator*=(const Angle &_angle)
{
this->value *= angle.value;
this->value *= _angle.value;
return *this;
}

//////////////////////////////////////////////////
Angle Angle::operator/=(const Angle &angle)
Angle Angle::operator/=(const Angle &_angle)
{
this->value /= angle.value;
this->value /= _angle.value;
return *this;
}

//////////////////////////////////////////////////
bool Angle::operator==(const Angle &angle) const
bool Angle::operator==(const Angle &_angle) const
{
return equal(this->value, angle.value, 0.001);
return equal(this->value, _angle.value, 0.001);
}

//////////////////////////////////////////////////
bool Angle::operator!=(const Angle &angle) const
bool Angle::operator!=(const Angle &_angle) const
{
return !(*this == angle);
return !(*this == _angle);
}

//////////////////////////////////////////////////
bool Angle::operator<(const Angle &angle) const
bool Angle::operator<(const Angle &_angle) const
{
return this->value < angle.value;
return this->value < _angle.value;
}

//////////////////////////////////////////////////
bool Angle::operator<=(const Angle &angle) const
bool Angle::operator<=(const Angle &_angle) const
{
return this->value < angle.value || equal(this->value, angle.value);
return this->value < _angle.value || equal(this->value, _angle.value);
}

//////////////////////////////////////////////////
bool Angle::operator>(const Angle &angle) const
bool Angle::operator>(const Angle &_angle) const
{
return this->value > angle.value;
return this->value > _angle.value;
}

//////////////////////////////////////////////////
bool Angle::operator>=(const Angle &angle) const
bool Angle::operator>=(const Angle &_angle) const
{
return this->value > angle.value || equal(this->value, angle.value);
return this->value > _angle.value || equal(this->value, _angle.value);
}

//////////////////////////////////////////////////
Expand Down

0 comments on commit 809586e

Please sign in to comment.