I have forgotten

• https://me.yahoo.com
COST (GBP)
0.76
0.00
0

# density

Density units, including imperial and SI units
Controller: will

C++
HTML

## Density

Density Calculator

Add calculator to website or email

 doubledensity( double number units from_unit units to_unit )
Converts a density from one unit to another.

### Example 1

```#include <iostream>
#include <codecogs/units/convert/density.h>

using namespace Units::Convert;
int main()
{
std::cout << "density(10.2,unit_g_m3, unit_lb_in3)=" << density(1500000,unit_g_m3, unit_lb_in3);

return 0;
}```
Output:
`density(1500000,unit_g_m3, unit_lb_in3)= 0.054190938`

### 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 density type to_unit an emuerated value of the output density type

### Returns

the value in the converted unit.

### Authors

will
##### 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) Density Grams/Meter3 Grams/Metre3 g/cu m unit_g_m3 1 Ounces/Gallon Ounce/Gallon Oz/gal unit_Oz_gal 0.000133526 Pounds/Foot3 Pounds/Feet3 lb/cu ft unit_lb_ft3 6.24E-05 Pounds/Inch3 Pound/Inch3 lb/cu in unit_lb_in3 3.61E-08 Tons/Yard3 Tonne/Yard3 T/cu yd unit_T_yd3 1.44E-06
##### Source Code

Source code is available when you buy a Commercial licence.

Not a member, then Register with CodeCogs. Already a Member, then Login.