Beispiel #1
0
 /**
  * @covers Marando\AstroDate\AstroDate::sidereal
  */
 public function testSidereal()
 {
     $tests = [[1.7541749718700912, AstroDate::mjd(53736.0, TimeScale::UT1())->sidereal('m'), 1.0E-9], [1.754166137675019, AstroDate::mjd(53736.0, TimeScale::UT1())->sidereal('a'), 1.0E-8], [1.7541749718700912 + deg2rad(-20), AstroDate::mjd(53736.0, TimeScale::UT1())->sidereal('m', Angle::deg(-20)), 1.0E-9], [1.754166137675019 + deg2rad(-20), AstroDate::mjd(53736.0, TimeScale::UT1())->sidereal('a', Angle::deg(-20)), 1.0E-8]];
     foreach ($tests as $t) {
         $expt = $t[0];
         $st = $t[1];
         $this->assertEquals($expt, Angle::time($st)->rad, null, $t[2]);
     }
 }
Beispiel #2
0
 public function testTime()
 {
     $angle = Angle::time(Time::hours(12));
     $this->assertEquals(180, $angle->deg);
 }