Skip to content

Commit

Permalink
object: Fix VectorAbs usage
Browse files Browse the repository at this point in the history
  • Loading branch information
misyltoad committed Aug 15, 2024
1 parent 9e4f9d2 commit 08bb865
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vphysics_jolt/vjolt_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ Vector JoltPhysicsObject::GetInertia() const
JPH::Vec3 joltInertiaTensor = m_pBody->GetMotionProperties()->GetInverseInertiaDiagonal().Reciprocal();
Vector vInertiaTensor = JoltToSource::Distance( joltInertiaTensor );
// For some reason, Source abs's in GetInertia/GetInvInertia. Don't ask me why.
return VectorAbs( vInertiaTensor );
return Abs( vInertiaTensor );
}

Vector JoltPhysicsObject::GetInvInertia() const
Expand All @@ -334,7 +334,7 @@ Vector JoltPhysicsObject::GetInvInertia() const

JPH::Vec3 joltInertiaTensor = m_pBody->GetMotionProperties()->GetInverseInertiaDiagonal();
Vector vInertiaTensor = JoltToSource::Distance( joltInertiaTensor );
return VectorAbs( vInertiaTensor );
return Abs( vInertiaTensor );
}

void JoltPhysicsObject::SetInertia( const Vector &inertia )
Expand Down

0 comments on commit 08bb865

Please sign in to comment.