2024-08-24 00:23:03 +00:00
|
|
|
use fixed_wide::wide::WideMul;
|
|
|
|
|
|
|
|
type Planar64=fixed::types::I32F32;
|
|
|
|
//type Planar64Wide1=fixed::types::I64F64;
|
|
|
|
//type Planar64Wide2=fixed_wide::types::I128F128;
|
|
|
|
type Planar64Wide3=fixed_wide::types::I256F256;
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn it_works() {
|
|
|
|
let a=Planar64::from(2);
|
|
|
|
let b=Planar64::from(3);
|
|
|
|
|
|
|
|
let w1=a.wide_mul(b);
|
|
|
|
let w2=w1.wide_mul(w1);
|
|
|
|
let w3=w2.wide_mul(w2);
|
|
|
|
|
|
|
|
assert_eq!(w3,Planar64Wide3::from(1296));
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
2024-08-23 23:26:19 +00:00
|
|
|
pub fn wide_vec3(){
|
|
|
|
let v=crate::vector::Vector3::from_value(Planar64::from(1));
|
|
|
|
let v1=v.wide_mul(v);
|
2024-08-24 00:23:03 +00:00
|
|
|
}
|