Merge branch 'master' of https://git.cscherr.de/PlexSheep/rs-basic
cargo devel CI / cargo CI (push) Successful in 2m2s
Details
cargo devel CI / cargo CI (push) Successful in 2m2s
Details
This commit is contained in:
commit
1b5b1c9e45
|
@ -1,3 +1,5 @@
|
||||||
|
#[rustfmt::skip]
|
||||||
|
|
||||||
/// I did it. I created the stupidest program ever
|
/// I did it. I created the stupidest program ever
|
||||||
///
|
///
|
||||||
/// this is so stupid, it literally makes rustfmt time out.
|
/// this is so stupid, it literally makes rustfmt time out.
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
use std::iter::zip;
|
use std::iter::zip;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// is n about the same as m?
|
// is n about the same as m?
|
||||||
// This is actually not so easy! How do you measure "about same"ness?
|
// This is actually not so easy! How do you measure "about same"ness?
|
||||||
// Also, it is not transitive, as 1 ≈ 1.1 ≈ 1.2 ≈ 1.3 ≈ ... ≈ 2 ≈ ... ≈ 3 ≈ ... ≈ infinity, that's
|
// Also, it is not transitive, as 1 ≈ 1.1 ≈ 1.2 ≈ 1.3 ≈ ... ≈ 2 ≈ ... ≈ 3 ≈ ... ≈ infinity, that's
|
||||||
|
@ -35,14 +31,7 @@ fn test_calc_regular_rsqrt() {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_calc_specific_fast_rsqrt() {
|
fn test_calc_specific_fast_rsqrt() {
|
||||||
let params: &[f32] = &[1.0, 1.1, 100.0, 1337.0, 123.456_79, 1337.1337];
|
let params: &[f32] = &[1.0, 1.1, 100.0, 1337.0, 123.456_79, 1337.1337];
|
||||||
let results: &[f32] = &[
|
let results: &[f32] = &[1.0, 0.953_462_6, 0.1, 0.027_348_55, 0.09, 0.027_347_183];
|
||||||
1.0,
|
|
||||||
0.953_462_6,
|
|
||||||
0.1,
|
|
||||||
0.027_348_55,
|
|
||||||
0.09,
|
|
||||||
0.027_347_183,
|
|
||||||
];
|
|
||||||
for (n, m) in zip(params, results) {
|
for (n, m) in zip(params, results) {
|
||||||
assert!(about_same(revsqrt::fast_inverse_sqrt(*n), *m))
|
assert!(about_same(revsqrt::fast_inverse_sqrt(*n), *m))
|
||||||
}
|
}
|
||||||
|
@ -51,14 +40,7 @@ fn test_calc_specific_fast_rsqrt() {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_calc_specific_reqular_rsqrt() {
|
fn test_calc_specific_reqular_rsqrt() {
|
||||||
let params: &[f32] = &[1.0, 1.1, 100.0, 1337.0, 123.456_79, 1337.1337];
|
let params: &[f32] = &[1.0, 1.1, 100.0, 1337.0, 123.456_79, 1337.1337];
|
||||||
let results: &[f32] = &[
|
let results: &[f32] = &[1.0, 0.953_462_6, 0.1, 0.027_348_55, 0.09, 0.027_347_183];
|
||||||
1.0,
|
|
||||||
0.953_462_6,
|
|
||||||
0.1,
|
|
||||||
0.027_348_55,
|
|
||||||
0.09,
|
|
||||||
0.027_347_183,
|
|
||||||
];
|
|
||||||
for (n, m) in zip(params, results) {
|
for (n, m) in zip(params, results) {
|
||||||
assert_eq!(revsqrt::regular_inverse_sqrt(*n), *m)
|
assert_eq!(revsqrt::regular_inverse_sqrt(*n), *m)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
use std::iter::zip;
|
use std::iter::zip;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
use cucumber::{gherkin::Step, given, then, when, World};
|
use cucumber::{gherkin::Step, given, then, when, World};
|
||||||
|
|
||||||
|
|
||||||
/// stores the current information for each scenario
|
/// stores the current information for each scenario
|
||||||
#[derive(Debug, Default, World)]
|
#[derive(Debug, Default, World)]
|
||||||
struct NumWorld {
|
struct NumWorld {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use std::{ sync::Arc};
|
use std::sync::Arc;
|
||||||
|
|
||||||
use tokio::{net::TcpListener, sync::Mutex};
|
use tokio::{net::TcpListener, sync::Mutex};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue