add pi to min/max

This commit is contained in:
Daniel Bauer
2020-03-08 11:42:47 +01:00
parent cd7bea063f
commit 936cbe1c58
11 changed files with 10352 additions and 10306 deletions

View File

@@ -23,9 +23,25 @@ fn cli() -> Result<Config> {
let cyclic: bool = matches.is_present("cyclic");
let hist_min: Vec<f64> = matches.value_of("min_hist").unwrap()
.split(',').map(|x| { x.parse().unwrap() }).collect();
.split(',').map(|x| {
if x.to_ascii_lowercase() == "pi" {
std::f64::consts::PI
} else if x.to_ascii_lowercase() == "-pi" {
-std::f64::consts::PI
} else {
x.parse().unwrap()
}
}).collect();
let hist_max: Vec<f64> = matches.value_of("max_hist").unwrap()
.split(',').map(|x| { x.parse().unwrap() }).collect();
.split(',').map(|x| {
if x.to_ascii_lowercase() == "pi" {
std::f64::consts::PI
} else if x.to_ascii_lowercase() == "-pi" {
-std::f64::consts::PI
} else {
x.parse().unwrap()
}
}).collect();
let num_bins: Vec<usize> = matches.value_of("bins").unwrap()
.split(',').map(|x| { x.parse().unwrap() }).collect();
let bootstrap: usize = matches.value_of("bootstrap").unwrap_or("0").parse()