Starts but segfaults sometimes, yay

This commit is contained in:
2021-10-16 12:59:11 +02:00
parent b1d8ef4120
commit 528b79812e
20 changed files with 226 additions and 230 deletions
+9 -2
View File
@@ -150,7 +150,14 @@ bool Transform::equals(const Transform &other, float tolerance)
{
return false;
}
if (abs(rotation.x - other.rotation.x) <= tolerance && abs(rotation.y - other.rotation.y) <= tolerance && abs(rotation.z - other.rotation.z) <= tolerance && abs(rotation.w - other.rotation.w) <= tolerance || abs(rotation.x + other.rotation.x) <= tolerance && abs(rotation.y + other.rotation.y) <= tolerance && abs(rotation.z + other.rotation.z) <= tolerance && abs(rotation.w - other.rotation.w) <= tolerance)
if ((abs(rotation.x - other.rotation.x) <= tolerance
&& abs(rotation.y - other.rotation.y) <= tolerance
&& abs(rotation.z - other.rotation.z) <= tolerance
&& abs(rotation.w - other.rotation.w) <= tolerance)
|| (abs(rotation.x + other.rotation.x) <= tolerance
&& abs(rotation.y + other.rotation.y) <= tolerance
&& abs(rotation.z + other.rotation.z) <= tolerance
&& abs(rotation.w + other.rotation.w) <= tolerance))
{
return false;
}
@@ -191,5 +198,5 @@ Transform Transform::operator*(const Transform &other) const
{
Transform outTransform;
multiply(&outTransform, this, &other);
return std::move(outTransform);
return outTransform;
}