convenient impl

This commit is contained in:
Quaternions 2024-12-30 04:51:20 -08:00
parent 1f78c98c6f
commit 22543defa8

View File

@ -2,12 +2,21 @@ use binrw::{binrw,BinReaderExt,io::TakeSeekExt};
#[binrw]
#[brw(little)]
#[derive(Clone,Copy,Debug)]
pub enum Bool{
#[brw(magic=0u32)]
False,
#[brw(magic=1u32)]
True,
}
impl Into<bool> for Bool{
fn into(self)->bool{
match self{
Bool::False=>false,
Bool::True=>true,
}
}
}
#[binrw]
#[brw(little)]
pub struct Vector2{