Math/Angle: Rename parameters to prevent name clash
This commit is contained in:
parent
f0e215f8f5
commit
4c8e40bb6c
|
|
@ -22,9 +22,9 @@ namespace Nz
|
|||
{
|
||||
public:
|
||||
Angle() = default;
|
||||
Angle(T Angle);
|
||||
template<AngleUnit U = Unit, typename C = std::enable_if_t<Unit == AngleUnit::Degree>> explicit Angle(const Angle<AngleUnit::Radian, T>& Angle) { Set(Angle); }
|
||||
template<AngleUnit U = Unit, typename C = std::enable_if_t<Unit == AngleUnit::Radian>> explicit Angle(const Angle<AngleUnit::Degree, T>& Angle) { Set(Angle); }
|
||||
Angle(T value);
|
||||
template<AngleUnit U = Unit, typename C = std::enable_if_t<Unit == AngleUnit::Degree>> explicit Angle(const Angle<AngleUnit::Radian, T>& value) { Set(value); }
|
||||
template<AngleUnit U = Unit, typename C = std::enable_if_t<Unit == AngleUnit::Radian>> explicit Angle(const Angle<AngleUnit::Degree, T>& value) { Set(value); }
|
||||
template<typename U> explicit Angle(const Angle<Unit, U>& Angle);
|
||||
Angle(const Angle&) = default;
|
||||
~Angle() = default;
|
||||
|
|
@ -49,16 +49,16 @@ namespace Nz
|
|||
|
||||
Angle& operator=(const Angle&) = default;
|
||||
|
||||
Angle operator+(const Angle& Angle) const;
|
||||
Angle operator-(const Angle& Angle) const;
|
||||
Angle operator+(const Angle& other) const;
|
||||
Angle operator-(const Angle& other) const;
|
||||
|
||||
Angle& operator+=(const Angle& Angle);
|
||||
Angle& operator-=(const Angle& Angle);
|
||||
Angle& operator+=(const Angle& other);
|
||||
Angle& operator-=(const Angle& other);
|
||||
Angle& operator*=(T scalar);
|
||||
Angle& operator/=(T divider);
|
||||
|
||||
bool operator==(const Angle& Angle) const;
|
||||
bool operator!=(const Angle& Angle) const;
|
||||
bool operator==(const Angle& other) const;
|
||||
bool operator!=(const Angle& other) const;
|
||||
|
||||
static Angle Zero();
|
||||
|
||||
|
|
|
|||
|
|
@ -147,11 +147,11 @@ namespace Nz
|
|||
/*!
|
||||
* \brief Constructs an Angle object with an angle value
|
||||
*
|
||||
* \param Angle value of the angle
|
||||
* \param value value of the angle
|
||||
*/
|
||||
template<AngleUnit Unit, typename T>
|
||||
Angle<Unit, T>::Angle(T Angle) :
|
||||
angle(Angle)
|
||||
Angle<Unit, T>::Angle(T value) :
|
||||
angle(value)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -323,10 +323,10 @@ namespace Nz
|
|||
* \brief Addition operator
|
||||
* \return Adds two angles together
|
||||
*
|
||||
* \param angle Angle to add
|
||||
* \param other Angle to add
|
||||
*/
|
||||
template<AngleUnit Unit, typename T>
|
||||
Angle<Unit, T> Angle<Unit, T>::operator+(const Angle& Angle) const
|
||||
Angle<Unit, T> Angle<Unit, T>::operator+(const Angle& other) const
|
||||
{
|
||||
return Angle(angle + Angle.angle);
|
||||
}
|
||||
|
|
@ -335,10 +335,10 @@ namespace Nz
|
|||
* \brief Subtraction operator
|
||||
* \return Subtracts two angles together
|
||||
*
|
||||
* \param angle Angle to subtract
|
||||
* \param other Angle to subtract
|
||||
*/
|
||||
template<AngleUnit Unit, typename T>
|
||||
Angle<Unit, T> Angle<Unit, T>::operator-(const Angle& Angle) const
|
||||
Angle<Unit, T> Angle<Unit, T>::operator-(const Angle& other) const
|
||||
{
|
||||
return Angle(angle - Angle.angle);
|
||||
}
|
||||
|
|
@ -347,10 +347,10 @@ namespace Nz
|
|||
* \brief Adds an angle by another
|
||||
* \return A reference to the angle
|
||||
*
|
||||
* \param angle Angle to add
|
||||
* \param other Angle to add
|
||||
*/
|
||||
template<AngleUnit Unit, typename T>
|
||||
Angle<Unit, T>& Angle<Unit, T>::operator+=(const Angle& Angle)
|
||||
Angle<Unit, T>& Angle<Unit, T>::operator+=(const Angle& other)
|
||||
{
|
||||
angle += Angle.angle;
|
||||
return *this;
|
||||
|
|
@ -360,10 +360,10 @@ namespace Nz
|
|||
* \brief Subtract an angle by another
|
||||
* \return A reference to the angle
|
||||
*
|
||||
* \param angle Angle to subtract
|
||||
* \param other Angle to subtract
|
||||
*/
|
||||
template<AngleUnit Unit, typename T>
|
||||
Angle<Unit, T>& Angle<Unit, T>::operator-=(const Angle& Angle)
|
||||
Angle<Unit, T>& Angle<Unit, T>::operator-=(const Angle& other)
|
||||
{
|
||||
angle -= Angle.angle;
|
||||
return *this;
|
||||
|
|
@ -399,24 +399,24 @@ namespace Nz
|
|||
* \brief Compares the angle to another for equality
|
||||
* \return True if both angles are equal
|
||||
*
|
||||
* \param Angle The other angle to compare to
|
||||
* \param other The other angle to compare to
|
||||
*/
|
||||
template<AngleUnit Unit, typename T>
|
||||
bool Angle<Unit, T>::operator==(const Angle& Angle) const
|
||||
bool Angle<Unit, T>::operator==(const Angle& other) const
|
||||
{
|
||||
return NumberEquals(angle, Angle.angle, Detail::AngleUtils<Unit>::GetEpsilon<T>());
|
||||
return NumberEquals(angle, other.angle, Detail::AngleUtils<Unit>::GetEpsilon<T>());
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Compares the angle to another for inequality
|
||||
* \return True if both angles are equal
|
||||
*
|
||||
* \param Angle The other angle to compare to
|
||||
* \param other The other angle to compare to
|
||||
*/
|
||||
template<AngleUnit Unit, typename T>
|
||||
bool Angle<Unit, T>::operator!=(const Angle& Angle) const
|
||||
bool Angle<Unit, T>::operator!=(const Angle& other) const
|
||||
{
|
||||
return !NumberEquals(angle, Angle.angle, Detail::AngleUtils<Unit>::GetEpsilon<T>());
|
||||
return !NumberEquals(angle, other.angle, Detail::AngleUtils<Unit>::GetEpsilon<T>());
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
|
|||
Loading…
Reference in New Issue