[ZF-10089] Zend_Log
[zend/radio.git] / library / Zend / Measure / Angle.php
blobfa1e6b8a0c716b732a10c651b7e9e7f520a5c9da
1 <?php
2 /**
3 * Zend Framework
5 * LICENSE
7 * This source file is subject to the new BSD license that is bundled
8 * with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://framework.zend.com/license/new-bsd
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
13 * to license@zend.com so we can send you a copy immediately.
15 * @category Zend
16 * @package Zend_Measure
17 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
18 * @license http://framework.zend.com/license/new-bsd New BSD License
19 * @version $Id$
22 /**
23 * Implement needed classes
25 require_once 'Zend/Measure/Abstract.php';
26 require_once 'Zend/Locale.php';
28 /**
29 * Class for handling angle conversions
31 * @category Zend
32 * @package Zend_Measure
33 * @subpackage Zend_Measure_Angle
34 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
35 * @license http://framework.zend.com/license/new-bsd New BSD License
37 class Zend_Measure_Angle extends Zend_Measure_Abstract
39 const STANDARD = 'RADIAN';
41 const RADIAN = 'RADIAN';
42 const MIL = 'MIL';
43 const GRAD = 'GRAD';
44 const DEGREE = 'DEGREE';
45 const MINUTE = 'MINUTE';
46 const SECOND = 'SECOND';
47 const POINT = 'POINT';
48 const CIRCLE_16 = 'CIRCLE_16';
49 const CIRCLE_10 = 'CIRCLE_10';
50 const CIRCLE_8 = 'CIRCLE_8';
51 const CIRCLE_6 = 'CIRCLE_6';
52 const CIRCLE_4 = 'CIRCLE_4';
53 const CIRCLE_2 = 'CIRCLE_2';
54 const FULL_CIRCLE = 'FULL_CIRCLE';
56 /**
57 * Calculations for all angle units
59 * @var array
61 protected $_units = array(
62 'RADIAN' => array('1','rad'),
63 'MIL' => array(array('' => M_PI,'/' => '3200'), 'mil'),
64 'GRAD' => array(array('' => M_PI,'/' => '200'), 'gr'),
65 'DEGREE' => array(array('' => M_PI,'/' => '180'), '°'),
66 'MINUTE' => array(array('' => M_PI,'/' => '10800'), "'"),
67 'SECOND' => array(array('' => M_PI,'/' => '648000'), '"'),
68 'POINT' => array(array('' => M_PI,'/' => '16'), 'pt'),
69 'CIRCLE_16' => array(array('' => M_PI,'/' => '8'), 'per 16 circle'),
70 'CIRCLE_10' => array(array('' => M_PI,'/' => '5'), 'per 10 circle'),
71 'CIRCLE_8' => array(array('' => M_PI,'/' => '4'), 'per 8 circle'),
72 'CIRCLE_6' => array(array('' => M_PI,'/' => '3'), 'per 6 circle'),
73 'CIRCLE_4' => array(array('' => M_PI,'/' => '2'), 'per 4 circle'),
74 'CIRCLE_2' => array(M_PI, 'per 2 circle'),
75 'FULL_CIRCLE' => array(array('' => M_PI,'*' => '2'), 'cir'),
76 'STANDARD' => 'RADIAN'