Skip to content

Commit

Permalink
add test to show imprecision of deg to DMS
Browse files Browse the repository at this point in the history
  • Loading branch information
pahjbo committed Sep 27, 2024
1 parent c7bd8ce commit be55e19
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/test/astroLib.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,16 @@ test("Degree to HourMinSec; pos(2)", () => {
test("Degree to DegreeMinSec; pos(2)", () => {
vv_ms(AstroLib.DegToDms(+89.26410897), "+89 15 50.79229", "DEG to DMS 1");
vv_ms(AstroLib.DegToDms(-60.8656960707900), "-60 51 56.50585", "DEG to DMS 2");
vv_ms(AstroLib.DegToDms(45.0), "45 00 0.0", "DEG to DMS 2");
});

test("Radian to HourMinSec; pos(2)", () => {
vv_ms(AstroLib.RadToHms(2.461052167719), "+9 24 1.8965692320", "RAD to HMS 1");
vv_ms(AstroLib.RadToHms(3.8701092891669), "+14 46 57.8228456736", "RAD to HMS 2");
});



test("Radian to DegreeMinSec; pos(2)", () => {
vv_ms(AstroLib.RadToDms(1.557952605), "+89 15 50.79229", "RAD to DMS 1");
vv_ms(AstroLib.RadToDms(-1.062306797953), "-60 51 56.50585", "RAD to DMS 2");
Expand Down

0 comments on commit be55e19

Please sign in to comment.