force
Force units, including imperial and SI units
Controller: will
Interface
C++
Force
doubleforce( | double | number | |
units | from_unit | ||
units | to_unit | ) |
Example 1
#include <iostream> #include <codecogs/units/convert/force.h> using namespace Units::Convert; int main() { std::cout << "force(10.2,unit_N, unit_lbf)=" << convert(10.2,unit_N, unit_lbf); return 0; }
Output:force(10.2,unit_N, unit_lbf)= 2.29305121962
Parameters
number the value in from_unit 's to convert from_unit an enumerated value of the initial force type to_unit an emuerated value of the output force 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) |
Force | ||||
Newtons | Newton | N | unit_N | 1 |
Gram Force | Grams Force | gf | unit_gf | 101.9716213 |
Joules/Centimeter | Joules/Centimetre | J/cm | unit_J-cm | 100 |
Joules/Meter | Joules/Metre | J/m | unit_J-m | 1 |
Ounce Force | Ounces Force | ozf | unit_ozf | 3.59694309 |
Pound Force | Pounds Force | lbf | unit_lbf | 0.224808943 |
Source Code
Source code is available when you buy a Commercial licence.
Not a member, then Register with CodeCogs. Already a Member, then Login.