From 544ccd75d1954fb63b16f41cf5e93cc3a275a647 Mon Sep 17 00:00:00 2001 From: numzero Date: Mon, 6 May 2024 15:02:18 +0300 Subject: [PATCH] Use a more integration-friendly metric --- src/bin/flat.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/flat.rs b/src/bin/flat.rs index 46a11df..c54ac5c 100644 --- a/src/bin/flat.rs +++ b/src/bin/flat.rs @@ -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); Decomp2 { ortho: Mat2::IDENTITY, - diag: vec2(1.0, self.scale.powf(-s)), + diag: vec2(1.0, 1.0.lerp(1.0 / self.scale, s)), } } }