fix TVec3<f32>::setLength

This commit is contained in:
LagoLunatic
2024-04-14 18:10:49 -04:00
parent 6a3ae88d95
commit 0c32a3d3c1
4 changed files with 23 additions and 26 deletions
+1 -5
View File
@@ -270,11 +270,7 @@ void JPAConvectionField::calc(JPAFieldData* data, JPABaseParticle* ptcl) {
JGeometry::TVec3<f32> newPos;
newPos.add(axisX, axisZ);
if (newPos.isZero()) {
newPos.zero();
} else {
newPos.setLength(data->mVal1);
}
newPos.setLength(newPos, data->mVal1);
JGeometry::TVec3<f32> delta, axisY;
delta.sub(ptcl->mLocalPosition, newPos);