public function testToParallax() { $stars = ['Proxima Centauri' => [Angle::mas(768.13), 1.30186, 0.01], 'Luhman 16' => [Angle::mas(500.51), 1.998, 0.01], 'Sirius' => [Angle::mas(379.21), 2.637, 0.01], 'WISE 0855-0710' => [Angle::mas(449), 2.23, 1]]; foreach ($stars as $star => $data) { $parallax = $data[0]; $parsecs = $data[1]; $accuracy = $data[2]; $dist = Distance::pc($parsecs); $this->assertEquals($parallax->mas, $dist->parallax->mas, $star, $accuracy); } }
/** * Returns a new angle with the negation of this instance. * * @return static */ public function neg() { return Angle::mas($this->mas * -1); }