Fix huge typo that was throwing off calculations

This commit is contained in:
Christian Rocha 2021-07-13 21:27:17 -04:00
parent 3bece8a812
commit 0b6d573edd
No known key found for this signature in database
GPG Key ID: D6CC7A16E5878018

View File

@ -204,6 +204,6 @@ func (s Spring) Update(pos, vel *float64, equilibriumPos float64) {
oldPos := *pos - equilibriumPos
oldVel := *vel
*pos = oldPos*s.posPosCoef + oldVel + s.posVelCoef + equilibriumPos
*pos = oldPos*s.posPosCoef + oldVel*s.posVelCoef + equilibriumPos
*vel = oldPos*s.velPosCoef + oldVel*s.velVelCoef
}