Cleanup
This commit is contained in:
parent
10563d8d56
commit
cbed57bd3a
|
|
@ -136,10 +136,10 @@ mod riemann {
|
||||||
|
|
||||||
pub fn trace_iter<M: Metric>(space: &M, base: Vec2, dir: Vec2, dt: f32) -> TraceIter<M> {
|
pub fn trace_iter<M: Metric>(space: &M, base: Vec2, dir: Vec2, dt: f32) -> TraceIter<M> {
|
||||||
TraceIter {
|
TraceIter {
|
||||||
space: space,
|
space,
|
||||||
p: base,
|
p: base,
|
||||||
v: space.normalize(base, dir),
|
v: space.normalize(base, dir),
|
||||||
dt: dt,
|
dt,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -198,10 +198,10 @@ mod riemann {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
fn convolute(G: Tens2, v: Vec2) -> Vec2 {
|
fn convolute(t: Tens2, v: Vec2) -> Vec2 {
|
||||||
vec2(
|
vec2(
|
||||||
dot(v, G[0] * v),
|
dot(v, t[0] * v),
|
||||||
dot(v, G[1] * v)
|
dot(v, t[1] * v)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -222,5 +222,5 @@ fn smoothbox(val: f32, range: Vec2, pad: f32) -> f32 {
|
||||||
let slope1 = 1.0 + (val - range.x) / pad;
|
let slope1 = 1.0 + (val - range.x) / pad;
|
||||||
let slope2 = 1.0 - (val - range.y) / pad;
|
let slope2 = 1.0 - (val - range.y) / pad;
|
||||||
let lin = min(slope1, slope2);
|
let lin = min(slope1, slope2);
|
||||||
smoothstep(glm::clamp(lin, 0.0, 1.0))
|
smoothstep(clamp(lin, 0.0, 1.0))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user