mirror of
https://github.com/cds-astro/aladin-lite.git
synced 2026-04-28 03:43:20 -07:00
fix #353 by adding more precision when displaying meridian grid labels
This commit is contained in:
@@ -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()
|
||||
|
||||
13126
src/core/src/shaders.rs
13126
src/core/src/shaders.rs
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user