Skip to content

Commit

Permalink
Transformation: add test for determinant method
Browse files Browse the repository at this point in the history
  • Loading branch information
vancluever committed Oct 17, 2024
1 parent 1188525 commit 1018123
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Transformation.zig
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,19 @@ test "equal" {
try testing.expect(!a.equal(b));
}

test "determinant" {
const a: Transformation = .{
.ax = 1,
.by = 2,
.cx = 3,
.dy = 4,
.tx = 5,
.ty = 6,
};

try testing.expectEqual(-2, a.determinant());
}

test "mul" {
const a: Transformation = .{
.ax = 1,
Expand Down

0 comments on commit 1018123

Please sign in to comment.