Commit efc4264
committed
Optimize weighted torque calculation to reduce crashes:
- Added a check to skip the calculation if the torque is already zero, highlighted in issue #55, reducing unnecessary calculations
- Retained the divide-by-zero check to ensure numerical stability when computing weighted torques
- Improved docstring to reflect the updated logic1 parent 67c55a0 commit efc4264
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
307 | 310 | | |
308 | 311 | | |
309 | 312 | | |
| |||
348 | 351 | | |
349 | 352 | | |
350 | 353 | | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
351 | 359 | | |
352 | 360 | | |
353 | 361 | | |
| |||
0 commit comments