docs: replaced 2 blocks with a table

This commit is contained in:
Andrew Voynov 2025-02-05 00:25:35 +03:00
parent 5b0b866099
commit f81e85fb95
No known key found for this signature in database
GPG Key ID: 1BE92DD685700329

View File

@ -34,29 +34,15 @@ use crate::foundations::{repr, ty, Repr};
/// multiply ratio by ratio, [length], [relative length]($relative), [angle], /// multiply ratio by ratio, [length], [relative length]($relative), [angle],
/// [int], [float], and [fraction]. /// [int], [float], and [fraction].
/// ///
/// ```example /// | Multiply by | Example |
/// #ratio: #(27% * 10%) \ /// |-----------------|--------------------------------------------------|
/// #length: #(27% * 100pt) \ /// | `{ratio}` | `{27% * 10%}` |
/// #relative: #(27% * (10% + 100pt)) \ /// | `{length}` | `{27% * 100pt}` |
/// #angle: #(27% * 100deg) \ /// | `{relative}` | `{27% * (10% + 100pt)}` |
/// #int: #(27% * 2) \ /// | `{angle}` | `{27% * 100deg}` |
/// #float: #(27% * 0.37037) \ // Some rounding is happening. /// | `{int}` | `{27% * 2}` |
/// #fraction: #(27% * 3fr) /// | `{float}` | `{27% * 0.37037 // Some rounding is happening.}` |
/// /// | `{fraction}` | `{27% * 3fr}` |
/// #table(
/// columns: 2,
/// align: (right, left),
/// inset: (x: 2pt),
/// table.vline(x: 1, stroke: none),
/// [#ratio:], [#(27% * 10%)],
/// [#length:], [#(27% * 100pt)],
/// [#relative:], [#(27% * (10% + 100pt))],
/// [#angle:], [#(27% * 100deg)],
/// [#int:], [#(27% * 2)],
/// [#float:], [#(27% * 0.37037)], // Some rounding is happening.
/// [#fraction:], [#(27% * 3fr)],
/// )
/// ```
/// ///
/// # Example /// # Example
/// ```example /// ```example