Skip to content

Commit

Permalink
Account for scale in similarity inverse (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjb3d authored Aug 28, 2023
1 parent 8598e31 commit 79bb9c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
## Unreleased

- Add `num_traits::identities` support behind a `num-traits` feature flag
- Fix inverse for similarities

## 0.9.1

Expand Down
2 changes: 1 addition & 1 deletion src/transform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,8 @@ macro_rules! similarities {
#[inline]
pub fn inverse(&mut self) {
self.rotation.reverse();
self.translation = self.rotation * (-self.translation);
self.scale = $t::splat(1.0) / self.scale;
self.translation = self.rotation * (-self.translation) * self.scale;
}

#[inline]
Expand Down

0 comments on commit 79bb9c4

Please sign in to comment.