fix #353 by adding more precision when displaying meridian grid labels

This commit is contained in:
Matthieu Baumann
2026-03-02 10:11:06 +01:00
parent 7aab92cb54
commit 0861294c66
2 changed files with 6566 additions and 6564 deletions

View File

@@ -579,8 +579,10 @@ use std::fmt::Display;
impl Display for Angle<f64> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self.fmt {
AngleFormatter::Sexagesimal { prec, plus, hours } => {
AngleFormatter::Sexagesimal { mut prec, plus, hours } => {
let unit = if hours {
// to preserve the same angular precision the new prec is p+log10(15) ≈ p+1.18 < p+2
prec += 2;
self.to_hours()
} else {
self.to_degrees()

File diff suppressed because it is too large Load Diff