diff --git a/src/bin/flat.rs b/src/bin/flat.rs index cf94272..a28b6a2 100644 --- a/src/bin/flat.rs +++ b/src/bin/flat.rs @@ -463,7 +463,6 @@ struct Rect { impl Rect { fn γ(&self) -> f32 { self.external_halflength / self.internal_halflength } fn ri(&self) -> f32 { self.internal_halflength } - fn re(&self) -> f32 { self.external_halflength } fn a(&self) -> f32 { (1.0 - self.γ()) / self.ri() } fn b(&self) -> f32 { 2.0 * self.γ() - 1.0 } @@ -679,14 +678,3 @@ mod riemann { assert_eq!(t[1].col(1)[1], 7.0); } } - -fn smoothstep(x: f32) -> f32 { - return 3.0 * x * x - 2.0 * x * x * x; -} - -fn smoothbox(val: f32, range: Vec2, pad: f32) -> f32 { - let slope1 = 1.0 + (val - range.x) / pad; - let slope2 = 1.0 - (val - range.y) / pad; - let lin = slope1.min(slope2); - smoothstep(lin.clamp(0.0, 1.0)) -}