Math/Angle: Rename angle field to value
This commit is contained in:
parent
7613f50a6e
commit
fb11fe1ecf
|
|
@ -74,7 +74,7 @@ namespace Nz
|
||||||
static Angle FromRadians(T ang);
|
static Angle FromRadians(T ang);
|
||||||
static Angle Zero();
|
static Angle Zero();
|
||||||
|
|
||||||
T angle;
|
T value;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,7 @@ namespace Nz
|
||||||
*/
|
*/
|
||||||
template<AngleUnit Unit, typename T>
|
template<AngleUnit Unit, typename T>
|
||||||
Angle<Unit, T>::Angle(T value) :
|
Angle<Unit, T>::Angle(T value) :
|
||||||
angle(value)
|
value(value)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -214,7 +214,7 @@ namespace Nz
|
||||||
template<AngleUnit Unit, typename T>
|
template<AngleUnit Unit, typename T>
|
||||||
Angle<Unit, T>& Angle<Unit, T>::MakeZero()
|
Angle<Unit, T>& Angle<Unit, T>::MakeZero()
|
||||||
{
|
{
|
||||||
angle = T(0);
|
value = T(0);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -231,9 +231,9 @@ namespace Nz
|
||||||
constexpr T limit = Detail::AngleUtils<Unit>::template GetLimit<T>();
|
constexpr T limit = Detail::AngleUtils<Unit>::template GetLimit<T>();
|
||||||
constexpr T twoLimit = limit * T(2);
|
constexpr T twoLimit = limit * T(2);
|
||||||
|
|
||||||
angle = std::fmod(angle, twoLimit);
|
value = std::fmod(value, twoLimit);
|
||||||
if (angle < T(0))
|
if (value < T(0))
|
||||||
angle += twoLimit;
|
value += twoLimit;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -245,7 +245,7 @@ namespace Nz
|
||||||
template<AngleUnit U, typename>
|
template<AngleUnit U, typename>
|
||||||
Angle<Unit, T>& Angle<Unit, T>::Set(const Angle<AngleUnit::Radian, T>& ang)
|
Angle<Unit, T>& Angle<Unit, T>::Set(const Angle<AngleUnit::Radian, T>& ang)
|
||||||
{
|
{
|
||||||
angle = RadianToDegree(ang.angle);
|
value = RadianToDegree(ang.value);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -258,7 +258,7 @@ namespace Nz
|
||||||
template<AngleUnit U, typename>
|
template<AngleUnit U, typename>
|
||||||
Angle<Unit, T>& Angle<Unit, T>::Set(const Angle<AngleUnit::Degree, T>& ang)
|
Angle<Unit, T>& Angle<Unit, T>::Set(const Angle<AngleUnit::Degree, T>& ang)
|
||||||
{
|
{
|
||||||
angle = DegreeToRadian(ang.angle);
|
value = DegreeToRadian(ang.value);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -270,7 +270,7 @@ namespace Nz
|
||||||
template<AngleUnit Unit, typename T>
|
template<AngleUnit Unit, typename T>
|
||||||
Angle<Unit, T>& Angle<Unit, T>::Set(const Angle& ang)
|
Angle<Unit, T>& Angle<Unit, T>::Set(const Angle& ang)
|
||||||
{
|
{
|
||||||
angle = ang.angle;
|
value = ang.value;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -285,7 +285,7 @@ namespace Nz
|
||||||
template<typename U>
|
template<typename U>
|
||||||
Angle<Unit, T>& Angle<Unit, T>::Set(const Angle<Unit, U>& ang)
|
Angle<Unit, T>& Angle<Unit, T>::Set(const Angle<Unit, U>& ang)
|
||||||
{
|
{
|
||||||
angle = static_cast<T>(ang.angle);
|
value = static_cast<T>(ang.value);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -296,7 +296,7 @@ namespace Nz
|
||||||
template<AngleUnit Unit, typename T>
|
template<AngleUnit Unit, typename T>
|
||||||
T Angle<Unit, T>::ToDegrees() const
|
T Angle<Unit, T>::ToDegrees() const
|
||||||
{
|
{
|
||||||
return Detail::AngleUtils<Unit>::ToDegrees(angle);
|
return Detail::AngleUtils<Unit>::ToDegrees(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -318,7 +318,7 @@ namespace Nz
|
||||||
template<AngleUnit Unit, typename T>
|
template<AngleUnit Unit, typename T>
|
||||||
EulerAngles<T> Angle<Unit, T>::ToEulerAngles() const
|
EulerAngles<T> Angle<Unit, T>::ToEulerAngles() const
|
||||||
{
|
{
|
||||||
return EulerAngles<T>(0, 0, ToDegreeAngle().angle);
|
return EulerAngles<T>(0, 0, ToDegrees());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -344,7 +344,7 @@ namespace Nz
|
||||||
template<AngleUnit Unit, typename T>
|
template<AngleUnit Unit, typename T>
|
||||||
T Angle<Unit, T>::ToRadians() const
|
T Angle<Unit, T>::ToRadians() const
|
||||||
{
|
{
|
||||||
return Detail::AngleUtils<Unit>::ToRadians(angle);
|
return Detail::AngleUtils<Unit>::ToRadians(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -364,7 +364,7 @@ namespace Nz
|
||||||
template<AngleUnit Unit, typename T>
|
template<AngleUnit Unit, typename T>
|
||||||
String Angle<Unit, T>::ToString() const
|
String Angle<Unit, T>::ToString() const
|
||||||
{
|
{
|
||||||
return Detail::AngleUtils<Unit>::ToString(angle);
|
return Detail::AngleUtils<Unit>::ToString(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -376,7 +376,7 @@ namespace Nz
|
||||||
template<AngleUnit Unit, typename T>
|
template<AngleUnit Unit, typename T>
|
||||||
Angle<Unit, T> Angle<Unit, T>::operator+(const Angle& other) const
|
Angle<Unit, T> Angle<Unit, T>::operator+(const Angle& other) const
|
||||||
{
|
{
|
||||||
return Angle(angle + other.angle);
|
return Angle(value + other.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -388,7 +388,7 @@ namespace Nz
|
||||||
template<AngleUnit Unit, typename T>
|
template<AngleUnit Unit, typename T>
|
||||||
Angle<Unit, T> Angle<Unit, T>::operator-(const Angle& other) const
|
Angle<Unit, T> Angle<Unit, T>::operator-(const Angle& other) const
|
||||||
{
|
{
|
||||||
return Angle(angle - other.angle);
|
return Angle(value - other.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -400,7 +400,7 @@ namespace Nz
|
||||||
template<AngleUnit Unit, typename T>
|
template<AngleUnit Unit, typename T>
|
||||||
Angle<Unit, T> Angle<Unit, T>::operator*(T scalar) const
|
Angle<Unit, T> Angle<Unit, T>::operator*(T scalar) const
|
||||||
{
|
{
|
||||||
return Angle(angle * scalar);
|
return Angle(value * scalar);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -412,7 +412,7 @@ namespace Nz
|
||||||
template<AngleUnit Unit, typename T>
|
template<AngleUnit Unit, typename T>
|
||||||
Angle<Unit, T> Angle<Unit, T>::operator/(T divider) const
|
Angle<Unit, T> Angle<Unit, T>::operator/(T divider) const
|
||||||
{
|
{
|
||||||
return Angle(angle / divider);
|
return Angle(value / divider);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -424,7 +424,7 @@ namespace Nz
|
||||||
template<AngleUnit Unit, typename T>
|
template<AngleUnit Unit, typename T>
|
||||||
Angle<Unit, T>& Angle<Unit, T>::operator+=(const Angle& other)
|
Angle<Unit, T>& Angle<Unit, T>::operator+=(const Angle& other)
|
||||||
{
|
{
|
||||||
angle += other.angle;
|
value += other.value;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -437,7 +437,7 @@ namespace Nz
|
||||||
template<AngleUnit Unit, typename T>
|
template<AngleUnit Unit, typename T>
|
||||||
Angle<Unit, T>& Angle<Unit, T>::operator-=(const Angle& other)
|
Angle<Unit, T>& Angle<Unit, T>::operator-=(const Angle& other)
|
||||||
{
|
{
|
||||||
angle -= other.angle;
|
value -= other.value;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -450,7 +450,7 @@ namespace Nz
|
||||||
template<AngleUnit Unit, typename T>
|
template<AngleUnit Unit, typename T>
|
||||||
Angle<Unit, T>& Angle<Unit, T>::operator*=(T scalar)
|
Angle<Unit, T>& Angle<Unit, T>::operator*=(T scalar)
|
||||||
{
|
{
|
||||||
angle *= scalar;
|
value *= scalar;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -463,7 +463,7 @@ namespace Nz
|
||||||
template<AngleUnit Unit, typename T>
|
template<AngleUnit Unit, typename T>
|
||||||
Angle<Unit, T>& Angle<Unit, T>::operator/=(T divider)
|
Angle<Unit, T>& Angle<Unit, T>::operator/=(T divider)
|
||||||
{
|
{
|
||||||
angle /= divider;
|
value /= divider;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -476,7 +476,7 @@ namespace Nz
|
||||||
template<AngleUnit Unit, typename T>
|
template<AngleUnit Unit, typename T>
|
||||||
bool Angle<Unit, T>::operator==(const Angle& other) const
|
bool Angle<Unit, T>::operator==(const Angle& other) const
|
||||||
{
|
{
|
||||||
return NumberEquals(angle, other.angle, Detail::AngleUtils<Unit>::template GetEpsilon<T>());
|
return NumberEquals(value, other.value, Detail::AngleUtils<Unit>::template GetEpsilon<T>());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -488,7 +488,7 @@ namespace Nz
|
||||||
template<AngleUnit Unit, typename T>
|
template<AngleUnit Unit, typename T>
|
||||||
bool Angle<Unit, T>::operator!=(const Angle& other) const
|
bool Angle<Unit, T>::operator!=(const Angle& other) const
|
||||||
{
|
{
|
||||||
return !NumberEquals(angle, other.angle, Detail::AngleUtils<Unit>::template GetEpsilon<T>());
|
return !NumberEquals(value, other.value, Detail::AngleUtils<Unit>::template GetEpsilon<T>());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -538,7 +538,7 @@ namespace Nz
|
||||||
template<AngleUnit Unit, typename T>
|
template<AngleUnit Unit, typename T>
|
||||||
bool Serialize(SerializationContext& context, const Angle<Unit, T>& angle, TypeTag<Angle<Unit, T>>)
|
bool Serialize(SerializationContext& context, const Angle<Unit, T>& angle, TypeTag<Angle<Unit, T>>)
|
||||||
{
|
{
|
||||||
if (!Serialize(context, angle.angle))
|
if (!Serialize(context, angle.value))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -554,7 +554,7 @@ namespace Nz
|
||||||
template<AngleUnit Unit, typename T>
|
template<AngleUnit Unit, typename T>
|
||||||
bool Unserialize(SerializationContext& context, Angle<Unit, T>* angle, TypeTag<Angle<Unit, T>>)
|
bool Unserialize(SerializationContext& context, Angle<Unit, T>* angle, TypeTag<Angle<Unit, T>>)
|
||||||
{
|
{
|
||||||
if (!Unserialize(context, &angle->angle))
|
if (!Unserialize(context, &angle->value))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -571,7 +571,7 @@ namespace Nz
|
||||||
template<Nz::AngleUnit Unit, typename T>
|
template<Nz::AngleUnit Unit, typename T>
|
||||||
Nz::Angle<Unit, T> operator*(T scale, const Nz::Angle<Unit, T>& angle)
|
Nz::Angle<Unit, T> operator*(T scale, const Nz::Angle<Unit, T>& angle)
|
||||||
{
|
{
|
||||||
return Nz::Angle<Unit, T>(scale * angle.angle);
|
return Nz::Angle<Unit, T>(scale * angle.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -584,7 +584,7 @@ Nz::Angle<Unit, T> operator*(T scale, const Nz::Angle<Unit, T>& angle)
|
||||||
template<Nz::AngleUnit Unit, typename T>
|
template<Nz::AngleUnit Unit, typename T>
|
||||||
Nz::Angle<Unit, T> operator/(T scale, const Nz::Angle<Unit, T>& angle)
|
Nz::Angle<Unit, T> operator/(T scale, const Nz::Angle<Unit, T>& angle)
|
||||||
{
|
{
|
||||||
return Nz::Angle<Unit, T>(scale / angle.angle);
|
return Nz::Angle<Unit, T>(scale / angle.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -597,7 +597,7 @@ Nz::Angle<Unit, T> operator/(T scale, const Nz::Angle<Unit, T>& angle)
|
||||||
template<Nz::AngleUnit Unit, typename T>
|
template<Nz::AngleUnit Unit, typename T>
|
||||||
std::ostream& operator<<(std::ostream& out, const Nz::Angle<Unit, T>& angle)
|
std::ostream& operator<<(std::ostream& out, const Nz::Angle<Unit, T>& angle)
|
||||||
{
|
{
|
||||||
return Nz::Detail::AngleUtils<Unit>::ToString(out, angle.angle);
|
return Nz::Detail::AngleUtils<Unit>::ToString(out, angle.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
#include <Nazara/Core/DebugOff.hpp>
|
#include <Nazara/Core/DebugOff.hpp>
|
||||||
|
|
|
||||||
|
|
@ -164,7 +164,7 @@ namespace Nz
|
||||||
|
|
||||||
|
|
||||||
DampedRotarySpringConstraint2D::DampedRotarySpringConstraint2D(RigidBody2D& first, RigidBody2D& second, const RadianAnglef& restAngle, float stiffness, float damping) :
|
DampedRotarySpringConstraint2D::DampedRotarySpringConstraint2D(RigidBody2D& first, RigidBody2D& second, const RadianAnglef& restAngle, float stiffness, float damping) :
|
||||||
Constraint2D(first.GetWorld(), cpDampedRotarySpringNew(first.GetHandle(), second.GetHandle(), restAngle.angle, stiffness, damping))
|
Constraint2D(first.GetWorld(), cpDampedRotarySpringNew(first.GetHandle(), second.GetHandle(), restAngle.value, stiffness, damping))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -190,7 +190,7 @@ namespace Nz
|
||||||
|
|
||||||
void DampedRotarySpringConstraint2D::SetRestAngle(const RadianAnglef& newAngle)
|
void DampedRotarySpringConstraint2D::SetRestAngle(const RadianAnglef& newAngle)
|
||||||
{
|
{
|
||||||
cpDampedRotarySpringSetRestAngle(m_constraint, newAngle.angle);
|
cpDampedRotarySpringSetRestAngle(m_constraint, newAngle.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DampedRotarySpringConstraint2D::SetStiffness(float newStiffness)
|
void DampedRotarySpringConstraint2D::SetStiffness(float newStiffness)
|
||||||
|
|
@ -334,7 +334,7 @@ namespace Nz
|
||||||
|
|
||||||
void RatchetConstraint2D::SetAngle(const RadianAnglef& angle)
|
void RatchetConstraint2D::SetAngle(const RadianAnglef& angle)
|
||||||
{
|
{
|
||||||
cpRatchetJointSetAngle(m_constraint, angle.angle);
|
cpRatchetJointSetAngle(m_constraint, angle.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RatchetConstraint2D::SetPhase(float phase)
|
void RatchetConstraint2D::SetPhase(float phase)
|
||||||
|
|
@ -349,7 +349,7 @@ namespace Nz
|
||||||
|
|
||||||
|
|
||||||
RotaryLimitConstraint2D::RotaryLimitConstraint2D(RigidBody2D& first, RigidBody2D& second, const RadianAnglef& minAngle, const RadianAnglef& maxAngle) :
|
RotaryLimitConstraint2D::RotaryLimitConstraint2D(RigidBody2D& first, RigidBody2D& second, const RadianAnglef& minAngle, const RadianAnglef& maxAngle) :
|
||||||
Constraint2D(first.GetWorld(), cpRotaryLimitJointNew(first.GetHandle(), second.GetHandle(), minAngle.angle, maxAngle.angle))
|
Constraint2D(first.GetWorld(), cpRotaryLimitJointNew(first.GetHandle(), second.GetHandle(), minAngle.value, maxAngle.value))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -365,12 +365,12 @@ namespace Nz
|
||||||
|
|
||||||
void RotaryLimitConstraint2D::SetMaxAngle(const RadianAnglef& maxAngle)
|
void RotaryLimitConstraint2D::SetMaxAngle(const RadianAnglef& maxAngle)
|
||||||
{
|
{
|
||||||
cpRotaryLimitJointSetMax(m_constraint, maxAngle.angle);
|
cpRotaryLimitJointSetMax(m_constraint, maxAngle.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RotaryLimitConstraint2D::SetMinAngle(const RadianAnglef& minAngle)
|
void RotaryLimitConstraint2D::SetMinAngle(const RadianAnglef& minAngle)
|
||||||
{
|
{
|
||||||
cpRotaryLimitJointSetMin(m_constraint, minAngle.angle);
|
cpRotaryLimitJointSetMin(m_constraint, minAngle.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -307,7 +307,7 @@ namespace Nz
|
||||||
|
|
||||||
void RigidBody2D::SetAngularVelocity(const RadianAnglef& angularVelocity)
|
void RigidBody2D::SetAngularVelocity(const RadianAnglef& angularVelocity)
|
||||||
{
|
{
|
||||||
cpBodySetAngularVelocity(m_handle, angularVelocity.angle);
|
cpBodySetAngularVelocity(m_handle, angularVelocity.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RigidBody2D::SetElasticity(float friction)
|
void RigidBody2D::SetElasticity(float friction)
|
||||||
|
|
@ -450,7 +450,7 @@ namespace Nz
|
||||||
|
|
||||||
void RigidBody2D::SetRotation(const RadianAnglef& rotation)
|
void RigidBody2D::SetRotation(const RadianAnglef& rotation)
|
||||||
{
|
{
|
||||||
cpBodySetAngle(m_handle, rotation.angle);
|
cpBodySetAngle(m_handle, rotation.value);
|
||||||
if (m_isStatic)
|
if (m_isStatic)
|
||||||
{
|
{
|
||||||
m_world->RegisterPostStep(this, [](Nz::RigidBody2D* body)
|
m_world->RegisterPostStep(this, [](Nz::RigidBody2D* body)
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ SCENARIO("Billboard", "[GRAPHICS][BILLBOARD]")
|
||||||
{
|
{
|
||||||
REQUIRE(billboard.GetColor() == materialColor);
|
REQUIRE(billboard.GetColor() == materialColor);
|
||||||
REQUIRE(billboard.GetMaterial().Get() == materialRef.Get());
|
REQUIRE(billboard.GetMaterial().Get() == materialRef.Get());
|
||||||
REQUIRE(billboard.GetRotation().angle == Approx(0.f));
|
REQUIRE(billboard.GetRotation().value == Approx(0.f));
|
||||||
REQUIRE(billboard.GetSize() == Nz::Vector2f(64.f, 64.f)); // Default sizes
|
REQUIRE(billboard.GetSize() == Nz::Vector2f(64.f, 64.f)); // Default sizes
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@ SCENARIO("RigidBody2D", "[PHYSICS2D][RIGIDBODY2D]")
|
||||||
CHECK(body.GetGeom() == box);
|
CHECK(body.GetGeom() == box);
|
||||||
CHECK(body.GetMass() == Approx(mass));
|
CHECK(body.GetMass() == Approx(mass));
|
||||||
CHECK(body.GetPosition() == position);
|
CHECK(body.GetPosition() == position);
|
||||||
CHECK(body.GetRotation().angle == Approx(0.f));
|
CHECK(body.GetRotation().value == Approx(0.f));
|
||||||
CHECK(body.GetUserdata() == &userData);
|
CHECK(body.GetUserdata() == &userData);
|
||||||
CHECK(body.GetVelocity() == Nz::Vector2f::Zero());
|
CHECK(body.GetVelocity() == Nz::Vector2f::Zero());
|
||||||
|
|
||||||
|
|
@ -196,8 +196,8 @@ SCENARIO("RigidBody2D", "[PHYSICS2D][RIGIDBODY2D]")
|
||||||
|
|
||||||
THEN("It is also counter-clockwise")
|
THEN("It is also counter-clockwise")
|
||||||
{
|
{
|
||||||
CHECK(body.GetAngularVelocity().angle >= 0.f);
|
CHECK(body.GetAngularVelocity().value >= 0.f);
|
||||||
CHECK(body.GetRotation().angle >= 0.f);
|
CHECK(body.GetRotation().value >= 0.f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -321,7 +321,7 @@ void EQUALITY(const Nz::RigidBody2D& left, const Nz::RigidBody2D& right)
|
||||||
CHECK(left.GetHandle() != right.GetHandle());
|
CHECK(left.GetHandle() != right.GetHandle());
|
||||||
CHECK(left.GetMass() == Approx(right.GetMass()));
|
CHECK(left.GetMass() == Approx(right.GetMass()));
|
||||||
CHECK(left.GetPosition() == right.GetPosition());
|
CHECK(left.GetPosition() == right.GetPosition());
|
||||||
CHECK(left.GetRotation().angle == Approx(right.GetRotation().angle));
|
CHECK(left.GetRotation().value == Approx(right.GetRotation().value));
|
||||||
CHECK(left.GetUserdata() == right.GetUserdata());
|
CHECK(left.GetUserdata() == right.GetUserdata());
|
||||||
CHECK(left.GetVelocity() == right.GetVelocity());
|
CHECK(left.GetVelocity() == right.GetVelocity());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue