Commit 26211bb
committed
Fix quaternion multiplication in place
Consider a multiplication like this:
`quat_mul(o->rotation, o->rotation, q)`
This does not work; the function modifies it's first argument during
calculations, and since it's a pointer it messes up the second argument
as well
So fix it by introducing a temporary variable1 parent 3954f97 commit 26211bb
1 file changed
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
453 | 453 | | |
454 | 454 | | |
455 | 455 | | |
456 | | - | |
457 | | - | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
458 | 459 | | |
459 | | - | |
| 460 | + | |
460 | 461 | | |
461 | | - | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
462 | 465 | | |
463 | 466 | | |
464 | 467 | | |
| |||
0 commit comments