use import
This commit is contained in:
parent
6ea9eff844
commit
6549305c9f
@ -1,26 +1,27 @@
|
|||||||
use fixed_wide_traits::wide::WideMul;
|
use fixed_wide_traits::wide::WideMul;
|
||||||
|
use crate::types::I32F32;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_wide_mul(){
|
fn test_wide_mul(){
|
||||||
let a=crate::types::I32F32::ONE;
|
let a=I32F32::ONE;
|
||||||
let aa=a.wide_mul(a);
|
let aa=a.wide_mul(a);
|
||||||
assert_eq!(aa,crate::types::I64F64::ONE);
|
assert_eq!(aa,crate::types::I64F64::ONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_bint(){
|
fn test_bint(){
|
||||||
let a=crate::types::I32F32::ONE;
|
let a=I32F32::ONE;
|
||||||
assert_eq!(a*2,crate::types::I32F32::from(2));
|
assert_eq!(a*2,I32F32::from(2));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_sqrt(){
|
fn test_sqrt(){
|
||||||
let a=crate::types::I32F32::ONE*4;
|
let a=I32F32::ONE*4;
|
||||||
assert_eq!(a.sqrt(),crate::types::I32F32::from(2));
|
assert_eq!(a.sqrt(),I32F32::from(2));
|
||||||
}
|
}
|
||||||
#[test]
|
#[test]
|
||||||
fn test_sqrt_low(){
|
fn test_sqrt_low(){
|
||||||
let a=crate::types::I32F32::HALF;
|
let a=I32F32::HALF;
|
||||||
let b=a*a;
|
let b=a*a;
|
||||||
assert_eq!(b.sqrt(),a);
|
assert_eq!(b.sqrt(),a);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user