ei: add support for libei
This commit is contained in:
parent
084fe50259
commit
40e87f8f91
69 changed files with 4340 additions and 72 deletions
|
|
@ -19,10 +19,18 @@ impl Fixed {
|
|||
Self((f * 256.0) as i32)
|
||||
}
|
||||
|
||||
pub fn from_f32(f: f32) -> Self {
|
||||
Self::from_f64(f as f64)
|
||||
}
|
||||
|
||||
pub fn to_f64(self) -> f64 {
|
||||
self.0 as f64 / 256.0
|
||||
}
|
||||
|
||||
pub fn to_f32(self) -> f32 {
|
||||
self.0 as f32 / 256.0
|
||||
}
|
||||
|
||||
pub fn from_1616(i: i32) -> Self {
|
||||
Self(i >> 8)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue