sized spans!

This commit is contained in:
2025-08-28 18:25:59 -04:00
parent d7d67e4ed3
commit a0e6623abe
7 changed files with 52 additions and 10 deletions

View File

@@ -75,4 +75,17 @@ impl Vec2 {
Axis::Y => &mut self.y,
}
}
pub const fn from_axis(axis: Axis, aligned: f32, ortho: f32) -> Self {
Self {
x: match axis {
Axis::X => aligned,
Axis::Y => ortho,
},
y: match axis {
Axis::Y => aligned,
Axis::X => ortho,
},
}
}
}