commenthol / astronomia

An astronomical library
MIT License
121 stars 23 forks source link

Unexpected .deg() result from sexagesimal.HourAngle and .RA #34

Open raybellis opened 1 year ago

raybellis commented 1 year ago

Is it intentional that the HourAngle class and its derived RA class return .hour() when .deg() is called?

I would have expected .deg() to convert the results into true decimal degrees, such that given:

    const sx = require('astronomia/sexagesimal');
    const ra = Math.PI / 2;
    const o = new sx.RA(ra)
    console.log(o.hour(), o.deg())

it should output 6 90 and not 6 6.