forked from StrafesNET/roblox-bot-player
more test
This commit is contained in:
@@ -114,11 +114,17 @@ fn req(r0:Ratio64,r1:Ratio64){
|
||||
|
||||
#[test]
|
||||
fn test(){
|
||||
req(ratio_from_float(0.00000000001).unwrap(),Ratio64::new(35204848,3520484800000000213).unwrap());
|
||||
req(ratio_from_float(0.5).unwrap(),Ratio64::new(1,2).unwrap());
|
||||
req(ratio_from_float(1.0).unwrap(),Ratio64::new(1,1).unwrap());
|
||||
req(ratio_from_float(1.1).unwrap(),Ratio64::new(2476979795053773,2251799813685248).unwrap());
|
||||
req(ratio_from_float(2.0).unwrap(),Ratio64::new(2,1).unwrap());
|
||||
req(ratio_from_float(core::f64::consts::PI).unwrap(),Ratio64::new(884279719003555,281474976710656).unwrap());
|
||||
req(ratio_from_float(1.0).unwrap(),Ratio64::new(1,1).unwrap());
|
||||
req(ratio_from_float(0.5).unwrap(),Ratio64::new(1,2).unwrap());
|
||||
req(ratio_from_float(1.1).unwrap(),Ratio64::new(2476979795053773,2251799813685248).unwrap());
|
||||
req(ratio_from_float(0.8).unwrap(),Ratio64::new(3602879701896397,4503599627370496).unwrap());
|
||||
req(ratio_from_float(0.61).unwrap(),Ratio64::new(5494391545392005,9007199254740992).unwrap());
|
||||
req(ratio_from_float(0.01).unwrap(),Ratio64::new(5764607523034235,576460752303423488).unwrap());
|
||||
req(ratio_from_float(0.001).unwrap(),Ratio64::new(1152921504606847,1152921504606846976).unwrap());
|
||||
req(ratio_from_float(0.00001).unwrap(),Ratio64::new(89605456633725,8960545663372499267).unwrap());
|
||||
req(ratio_from_float(0.00000000001).unwrap(),Ratio64::new(35204848,3520484800000000213).unwrap());
|
||||
req(ratio_from_float(0.000000000000000001).unwrap(),Ratio64::new(2,1999999999999999857).unwrap());
|
||||
req(ratio_from_float(2222222222222.0).unwrap(),Ratio64::new(2222222222222,1).unwrap());
|
||||
req(ratio_from_float(core::f64::consts::PI).unwrap(),Ratio64::new(884279719003555,281474976710656).unwrap());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user