Remove unused code

This commit is contained in:
numzero 2024-06-09 20:10:00 +03:00
parent 196d387c1f
commit c510a3fc70

View File

@ -463,7 +463,6 @@ struct Rect {
impl Rect { impl Rect {
fn γ(&self) -> f32 { self.external_halflength / self.internal_halflength } fn γ(&self) -> f32 { self.external_halflength / self.internal_halflength }
fn ri(&self) -> f32 { 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 a(&self) -> f32 { (1.0 - self.γ()) / self.ri() }
fn b(&self) -> f32 { 2.0 * self.γ() - 1.0 } fn b(&self) -> f32 { 2.0 * self.γ() - 1.0 }
@ -679,14 +678,3 @@ mod riemann {
assert_eq!(t[1].col(1)[1], 7.0); 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))
}