Skip to content

"distributed" multiplication in deg2hms to avoid rounding error due to floating point rounding errors.#4

Open
AstroTeutloff wants to merge 1 commit into
boom-astro:mainfrom
AstroTeutloff:main
Open

"distributed" multiplication in deg2hms to avoid rounding error due to floating point rounding errors.#4
AstroTeutloff wants to merge 1 commit into
boom-astro:mainfrom
AstroTeutloff:main

Conversation

@AstroTeutloff

@AstroTeutloff AstroTeutloff commented Dec 5, 2025

Copy link
Copy Markdown

I've just edited the one line in the function, it could be that the deg2dms function has the same issue.
Minimal working example is now:

use flare::spatial;
fn main() {
    let hms = spatial::deg2hms(180.5);
    println!("{}", hms);
    assert_eq!(hms, "12:02:00.0000");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant