Skip to content

Commit

Permalink
Units for Rotation added
Browse files Browse the repository at this point in the history
  • Loading branch information
olifolkerd committed Dec 20, 2015
1 parent 087d7e3 commit e175e74
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Convertor.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ function defineUnits(){
"kph"=>array("base"=>"mps", "conversion"=>0.44704), //kilometer per hour
"mph"=>array("base"=>"mps", "conversion"=>0.277778), //kilometer per hour

///////Units Of Rotation///////
"deg"=>array("base"=>"deg", "conversion"=>1), //degrees - base unit for rotation
"rad"=>array("base"=>"deg", "conversion"=>57.2958), //radian

///////Units Of Temperature///////
"k"=>array("base"=>"k", "conversion"=>1), //kelvin - base unit for distance
"c"=>array("base"=>"c", "conversion"=>function($val, $tofrom){return $tofrom ? $val - 273.15 : $val + 273.15;}), //celsius
Expand Down Expand Up @@ -83,10 +87,9 @@ function defineUnits(){

///////Units Of Power///////

/


///////Units Of Angle///////


///////Units Of Energy///////
);
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Convertor can handle a wide range of unit types including:
<li>Volume</li>
<li>Weight</li>
<li>Speed</li>
<li>Rotation</li>
<li>Temperature</li>
<li>Pressure</li>
<li>Time</li>
Expand Down Expand Up @@ -210,6 +211,10 @@ Available Units
- kph - Kilometers Per Hour
- mph - Miles Per Hour

###Rotation
- deg - Degrees
- rad - Radian

###Temperature
- k - Kelvin
- c - Centigrade
Expand Down

0 comments on commit e175e74

Please sign in to comment.