Skip to content

Commit

Permalink
Add expansion method to matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
ginnyTheCat committed Jan 30, 2025
1 parent 7d01aa4 commit aed1f1b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/matrix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ impl Matrix {
self.d += h * b;
self
}

pub fn expansion(&self) -> f32 {
(self.a * self.d - self.b * self.c).abs().sqrt()
}
}

impl Default for Matrix {
Expand Down

0 comments on commit aed1f1b

Please sign in to comment.