pixelfaucet/spec/mat4_spec.cr

21 lines
411 B
Crystal
Raw Normal View History

2021-12-19 23:17:51 -05:00
require "./spec_helper"
require "../src/3d/*"
describe PF::Mat4 do
2021-12-19 23:17:51 -05:00
describe "#*" do
it "returns the same matrix when multiplied by identity" do
mat = PF::Mat4.new(Slice[
2021-12-19 23:17:51 -05:00
1.0, 2.0, 3.0, 4.0,
1.0, 2.0, 3.0, 4.0,
1.0, 2.0, 3.0, 4.0,
1.0, 2.0, 3.0, 4.0,
])
ident = PF::Mat4.identity
2021-12-19 23:17:51 -05:00
result = mat * ident
result.should eq(mat)
end
end
end