1.3 KiB
1.3 KiB
title |
---|
Converting Units Centimeters to Meters |
Converting Units Centimeters to Meters
Centi- (symbol c) is a unit prefix in the metric system denoting a factor of one hundredth
Meaning a Centimenter is one hundredth of a meter. x cm = x m / 100
Examples 1 cm = 1 m / 100 = 0.01 m 10 cm = 10 m / 100 = 0.1 m 1.2 cm = 1.2 m / 100 = 0.012 m
Per definition, one centimeter is one hundreth of a meter
In the following formula the units are notated with brackets [ ] around them
[cm] / 100 = [m]
If you enter the value you have, let's say 50 centimeters, it will be calculated like this:
50[cm] / 100 = 0.5[m]
The result of the calculation returns a value of 0.5 meters, the amount of meters 50 centimeter is.
Examples
- 1 cm = 0.01 m (1⁄100)
- 25 cm = 0.25 m (25⁄100)
- 200 cm = 2 m (200⁄100)
Coding
function convertCentimeterToMeter (cm) {
return ( cm / 100 );
}
// Set some example measurements
var lengthInCm = 300;
var lengthInM;
lengthInM = convertCentimeterToMeter(lengthInCm); // 3