diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2023-11-19 21:22:24 +0100 |
---|---|---|
committer | Kacper Michajłow <kasper93@gmail.com> | 2024-03-21 03:50:11 +0100 |
commit | 8708f4dc918b1bc005149c50abb3d54d66ed3047 (patch) | |
tree | a542bb97e54ba7f6287c755ece5fe1d73bd4b910 /DOCS/interface-changes/floating-point_property_expansion.txt | |
parent | c84bb1ce67f2dd3adb974c49a66d28c0cf55d39d (diff) | |
download | mpv-8708f4dc918b1bc005149c50abb3d54d66ed3047.tar.bz2 mpv-8708f4dc918b1bc005149c50abb3d54d66ed3047.tar.xz |
m_property: add `>` for fixed precision floating-point expansion
This enhancement makes it easier to create constant width property
expansions, useful for the `--term-status-msg`. Additionally, it changes
to `%f` printing with manual zero trimming, which is easier to control
than `%g`. With this method, we can directly specify precision, not just
significant numbers. This approach also avoids overly high precision for
values less than 1, which is not necessary for a generic floating-point
print function.
A new print helper function is added, which can be used with adjusted
precision for specific cases where a different default is needed. This
also unifies the code slightly.
Diffstat (limited to 'DOCS/interface-changes/floating-point_property_expansion.txt')
-rw-r--r-- | DOCS/interface-changes/floating-point_property_expansion.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/DOCS/interface-changes/floating-point_property_expansion.txt b/DOCS/interface-changes/floating-point_property_expansion.txt new file mode 100644 index 0000000000..eeda63d113 --- /dev/null +++ b/DOCS/interface-changes/floating-point_property_expansion.txt @@ -0,0 +1 @@ +add `>` for fixed precision floating-point property expansion |