This commit is contained in:
Quaternions 2024-07-27 12:42:08 -07:00
parent 6a3c097741
commit 7a03b079d8
2 changed files with 23 additions and 0 deletions

View File

@ -1,3 +1,4 @@
mod common;
pub mod aabb; pub mod aabb;
pub mod model; pub mod model;
pub mod integer; pub mod integer;

22
src/newtypes/common.rs Normal file
View File

@ -0,0 +1,22 @@
#[binrw::binrw]
#[brw(little,repr=u8)]
pub enum Boolio{
True,
False
}
impl Into<bool> for Boolio{
fn into(self)->bool{
match self{
Boolio::True=>true,
Boolio::False=>false,
}
}
}
impl From<bool> for Boolio{
fn from(value:bool)->Self{
match value{
true=>Boolio::True,
false=>Boolio::False,
}
}
}