angle
Angle Units, including imperial and SI units
Interface
#include <codecogs/units/convert/angle.h>
using namespace Units::Convert;
Overview
The standard measurement units are:
| Unit names | Alternate names / spellings | Abbreviation | Enumeration Code | Conversion Rate (relative to first unit) |
| Angle | ||||
| Radians | Radian | rad | unit_rad | 1 |
| Circles | Circle | cir | unit_cir | 0.159154943 |
| Degrees | Degree | deg | unit_deg | 57.29577951 |
| Grades | Grade | grd | unit_grd | 63.66197724 |
| Minutes | Minute | min (angle) | unit_min_angle | 3437.746771 |
| Octants | Octant | octant | unit_octant | 1.273239545 |
| Revolutions | Revolution | rev | unit_rev | 0.159154943 |
| Seconds | Second | sec | unit_sec_angle | 206264.8062 |
| Turns | Turn | trn | unit_trn | 0.159154943 |
| Quadrants | Quadrant | quad | unit_quad | 0.636619772 |
FUNCTION
angle
Converts an angle from one unit to another.
Example 1
#include <iostream>
#include <codecogs/units/convert/angle.h>
using namespace Units::Convert;
int main()
{
std::cout << "angle(10.2,unit_rad, unit_cir)=" << angle(10.2,unit_rad, unit_cir);
return 0;
}Output:
angle(10.2,unit_rad, unit_cir)= 1.62338041Parameters
number
the value in from_unit 's to convert
from_unit
an enumerated value of the initial angle type
to_unit
an emuerated value of the output angle type
Returns
the value in the converted unit.
This function's source code is only visible to registered users — documentation and the calculator above are free to use either way. Sign in to see it.