Testing_FIT
[ class tree: Testing_FIT ] [ index: Testing_FIT ] [ all elements ]

Source for file Trigonometry.php

Documentation is available at Trigonometry.php

  1. <?php
  2.  
  3. include_once 'Testing/FIT/Fixture.php';
  4. include_once 'Testing/FIT/Fixture/Column.php';
  5.  
  6.  
  7. {
  8.  
  9.     protected $_typeDictionary = array(
  10.                                         'degree'   => 'float',
  11.                                         'sin()'    => 'float',
  12.                                         'cos()'    => 'float',
  13.                                         'tan()'    => 'string',
  14.                                     );
  15.  
  16.     public $degree;
  17.     
  18.     private $infinite   =   1000000;
  19.     private $round      =   3;
  20.  
  21.     public function sin(
  22.     {
  23.         $res    =   sindeg2rad$this->degree ) );
  24.         return round$res$this->round );
  25.     }
  26.     
  27.     public function cos(
  28.     {
  29.         $res    =   cosdeg2rad$this->degree ) );
  30.         return round$res$this->round );
  31.     }
  32.     
  33.     public function tan(
  34.     {
  35.         $res    =   tandeg2rad$this->degree ) );
  36.         if$res $this->infinite {
  37.             return 'infinite';
  38.         }
  39.         
  40.         return round$res$this->round );
  41.     }
  42. }
  43. ?>

Documentation generated on Mon, 11 Mar 2019 15:05:06 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.