Converts centimeters to inches. - Android java.lang

Android examples for java.lang:Math Convert

Description

Converts centimeters to inches.

Demo Code


//package com.java2s;

public class Main {
    /**//from  ww  w.j  a va2s  .  c om
     * Converts centi-meters to inches.
     * 
     * @param cm to be converted.
     * @return value converted to inches.
     */
    public static double cmToInches(double cm) {
        return cm / 2.54;
    }
}

Related Tutorials