Ejemplo n.º 1
0
 public function testAcos()
 {
     $this->assertTrue(CMathf::equalsZt(CMathf::acos(1.0), 0.0));
     $this->assertTrue(CMathf::equalsZt(CMathf::acos(0.0), CMathf::HALF_PI));
     $this->assertTrue(CMathf::equalsZt(CMathf::acos(0.707106781), CMathf::PI / 4));
     $this->assertTrue(CMathf::equalsZt(CMathf::acos(0.8660254040000001), CMathf::PI / 6));
     // Special cases.
     $this->assertTrue(CMathf::equalsZt(CMathf::acos(1.5), 0.0));
     $this->assertTrue(CMathf::equalsZt(CMathf::acos(2.0), 0.0));
     $this->assertTrue(CMathf::equalsZt(CMathf::acos(-3.0), CMathf::PI));
     $this->assertTrue(CMathf::equalsZt(CMathf::acos(-10.0), CMathf::PI));
     $this->assertTrue(CMathf::equalsZt(CMathf::acos(0), 1.570796327));
 }