BUAHAHAHAHA
This commit is contained in:
parent
75ca27f232
commit
e7eac03f04
@ -1,5 +1,7 @@
|
|||||||
use fixed_wide::wide::WideMul;
|
use fixed_wide::wide::WideMul;
|
||||||
|
|
||||||
|
use crate::Vector3;
|
||||||
|
|
||||||
type Planar64=fixed::types::I32F32;
|
type Planar64=fixed::types::I32F32;
|
||||||
//type Planar64Wide1=fixed::types::I64F64;
|
//type Planar64Wide1=fixed::types::I64F64;
|
||||||
//type Planar64Wide2=fixed_wide::types::I128F128;
|
//type Planar64Wide2=fixed_wide::types::I128F128;
|
||||||
@ -14,11 +16,15 @@ fn it_works() {
|
|||||||
let w2=w1.wide_mul(w1);
|
let w2=w1.wide_mul(w1);
|
||||||
let w3=w2.wide_mul(w2);
|
let w3=w2.wide_mul(w2);
|
||||||
|
|
||||||
assert_eq!(w3,Planar64Wide3::from(1296));
|
assert_eq!(w3,Planar64Wide3::from((3i128*2).pow(4)));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
pub fn wide_vec3(){
|
pub fn wide_vec3(){
|
||||||
let v=crate::vector::Vector3::from_value(Planar64::from(1));
|
let v=Vector3::from_value(Planar64::from(3));
|
||||||
let v1=v.wide_mul(v);
|
let v1=v.wide_mul(v);
|
||||||
|
let v2=v1.wide_mul(v1);
|
||||||
|
let v3=v2.wide_mul(v2);
|
||||||
|
|
||||||
|
assert_eq!(v3,Vector3::from_value(Planar64Wide3::from(3i128.pow(8))));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user