Apply Clippy recommendations
This commit is contained in:
1 parent
34b3fc0850
commit
cacc5b1a6b
11 files changed
+82
-105
No files matched your search
+5
-1
@@ -2,7 +2,11 @@ pub struct Utils {}
|
||||
|
||||
impl Utils {
|
||||
pub fn a_else_b(a: f64, b: f64) -> f64 {
|
||||
return if a > 0.0 { a } else { b };
|
||||
if a > 0.0 {
|
||||
a
|
||||
} else {
|
||||
b
|
||||
}
|
||||
}
|
||||
pub fn ewma_factor(tick: f64, dur: f64) -> f64 {
|
||||
((0.5_f64).ln() / (dur / tick)).exp()
|
||||
|
||||
Reference in new issue
Block a user