Use a more integration-friendly metric
This commit is contained in:
parent
083bce28a7
commit
544ccd75d1
|
|
@ -211,7 +211,7 @@ impl Metric for Rect {
|
||||||
let s = smoothbox(pos.x, vec2(-self.r.x, self.r.x), self.m.x) * smoothbox(pos.y, vec2(-self.r.y, self.r.y), self.m.y);
|
let s = smoothbox(pos.x, vec2(-self.r.x, self.r.x), self.m.x) * smoothbox(pos.y, vec2(-self.r.y, self.r.y), self.m.y);
|
||||||
Decomp2 {
|
Decomp2 {
|
||||||
ortho: Mat2::IDENTITY,
|
ortho: Mat2::IDENTITY,
|
||||||
diag: vec2(1.0, self.scale.powf(-s)),
|
diag: vec2(1.0, 1.0.lerp(1.0 / self.scale, s)),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user