Skip to content

Commit

Permalink
Add Vector4i and tests for Vector4i
Browse files Browse the repository at this point in the history
  • Loading branch information
gkhk0 committed Oct 22, 2024
1 parent cc92db9 commit 46cef71
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/types/vectors/vector4.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::types::vectors::AXIS;
use crate::types::vectors::{Vector4i, AXIS};
use crate::utils::{
cubic_interpolate, cubic_interpolate_in_time, float, int, is_equal_approx,
is_equal_approx_with_tolerance, is_zero_approx, posmod_f, snapped, FloatExt, UNIT_EPSILON,
Expand Down Expand Up @@ -624,3 +624,9 @@ impl Display for Vector4 {
))
}
}

impl From<Vector4i> for Vector4 {
fn from(value: Vector4i) -> Self {
Vector4::new(value.x as float!(), value.y as float!(), value.z as float!(), value.w as float!())
}
}

0 comments on commit 46cef71

Please sign in to comment.