Skip to content

Commit

Permalink
Also add support for Mat3.
Browse files Browse the repository at this point in the history
Was omitted earlier for no clear reason, might as well have it too.
  • Loading branch information
Thomas Duindam committed Sep 2, 2024
1 parent 24e2879 commit b25f872
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion fake/src/impls/glam/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
use crate::{Dummy, Fake, Faker};
use glam::{Mat4, Vec2, Vec3, Vec4};
use glam::{Mat3, Mat4, Vec2, Vec3, Vec4};

impl Dummy<Faker> for Mat3 {
fn dummy_with_rng<R: rand::Rng + ?Sized>(_f: &Faker, rng: &mut R) -> Self {
let col_1: Vec3 = Faker.fake_with_rng(rng);
let col_2: Vec3 = Faker.fake_with_rng(rng);
let col_3: Vec3 = Faker.fake_with_rng(rng);
Mat3::from_cols(col_1, col_2, col_3)
}
}


impl Dummy<Faker> for Mat4 {
fn dummy_with_rng<R: rand::Rng + ?Sized>(_f: &Faker, rng: &mut R) -> Self {
Expand Down

0 comments on commit b25f872

Please sign in to comment.