improvement suggested during PR

Signed-off-by: greerdv <greerdv@amazon.com>
This commit is contained in:
greerdv
2021-11-30 19:33:39 +00:00
parent bb5c2ac462
commit a44270e4df
@@ -273,7 +273,7 @@ namespace EMotionFX
{
AZ::Vector3 boneCenter = nodeTransform.GetTranslation() + 0.5f * boneDirection;
float sumDistanceFromAxisSq = 0.0f;
float boneLengthSqReciprocal = 1.0f / boneDirection.GetLengthSq();
float boneLengthSqReciprocal = 1.0f / (boneLength * boneLength);
for (int i = 0; i < numMeshPoints; i++)
{
meshPoints[i] -= boneCenter;