area
Measurement units, including imperial and SI units
Controller: will
Interface
C++
Area
doublearea( | double | number | |
units | from_unit | ||
units | to_unit | ) |
Example 1
#include <iostream> #include <codecogs/units/convert/area.h> using namespace Units::Convert; int main() { std::cout << "area(10.2,unit_m2, unit_ha)=" << area(10.2,unit_m2, unit_ha); return 0; }
Output:area(10.2,unit_m2, unit_ha)= 0.00102
Note
- Conversion between incompatible types will throw an error
Parameters
number the value in from_unit 's to convert from_unit an enumerated value of the initial area type to_unit an emuerated value of the output area type
Returns
- the value in the converted unit.
Source Code
Source code is available when you buy a Commercial licence.
Not a member, then Register with CodeCogs. Already a Member, then Login.
Other Documentation
The standard measurement units are:Unit names | Alternate names / spellings | Abbreviation | Enumeration Code | Conversion Rate (relative to first unit) |
Area | ||||
Meters2 | Metres2 | sq m | unit_m2 | 1 |
Acres | acre | a | unit_a | 0.000247104 |
Feet2 | foot2 | sq ft | unit_ft2 | 10.76391042 |
Hectares | Hectare | ha | unit_ha | 0.0001 |
Inches2 | Inch2 | sq in | unit_in2 | 1550.0031 |
Miles2 | Mile2 | sq mi | unit_mi2 | 3.86E-07 |
Yards2 | Yard2 | sq yd | unit_yd2 | 1.195990046 |
Source Code
Source code is available when you buy a Commercial licence.
Not a member, then Register with CodeCogs. Already a Member, then Login.