summaryrefslogtreecommitdiff
path: root/library/src/math/root.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-02-02 14:13:56 +0100
committerLaurenz <laurmaedje@gmail.com>2023-02-02 14:13:56 +0100
commit5f5c65927982447133b625edea3f5c9bab4f9e3d (patch)
treeaa5edb320e21466d16a1d15ad320d164f94738db /library/src/math/root.rs
parent21dd99926a24d7cc69bf6b032d1107c78a04a5cf (diff)
Math tests
Diffstat (limited to 'library/src/math/root.rs')
-rw-r--r--library/src/math/root.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/library/src/math/root.rs b/library/src/math/root.rs
index d348ecc1..2d27bb11 100644
--- a/library/src/math/root.rs
+++ b/library/src/math/root.rs
@@ -1,5 +1,7 @@
use super::*;
+const MIN_INDEX_SHIFT: Em = Em::new(0.35);
+
/// # Square Root
/// A square root.
///
@@ -126,7 +128,7 @@ fn layout(
if let Some(index) = &index {
sqrt_offset = kern_before + index.width() + kern_after;
- shift_up.set_max(index.descent() + Em::new(0.35).scaled(ctx));
+ shift_up.set_max(index.descent() + MIN_INDEX_SHIFT.scaled(ctx));
ascent.set_max(shift_up + index.ascent());
}