Skip to content

Commit

Permalink
PR godot-rust#791 Address review feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
setzer22 committed Oct 25, 2021
1 parent 76b73df commit 0038317
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gdnative-core/src/core_types/transform2d.rs
Expand Up @@ -83,7 +83,7 @@ impl Transform2D {
let mut inverted = *self;

let det = self.basis_determinant();
// assert!(det != 0.0, "The determinant cannot be zero");
debug_assert!(det != 0.0, "The determinant cannot be zero");
let idet = 1.0 / det;

std::mem::swap(&mut inverted.x.x, &mut inverted.y.y);
Expand Down Expand Up @@ -164,7 +164,7 @@ impl Transform2D {
/// Returns the transform's scale.
#[inline]
pub fn scale(&self) -> Vector2 {
let det_sign = f32::signum(self.basis_determinant());
let det_sign = self.basis_determinant().signum();
Vector2::new(self.x.length(), det_sign * self.y.length())
}

Expand Down

0 comments on commit 0038317

Please sign in to comment.