Converts the length value from meter to feet. - Java java.lang

Java examples for java.lang:Math Convert

Description

Converts the length value from meter to feet.

Demo Code


//package com.java2s;

public class Main {
    /**/*from w  w  w. j a v  a  2 s .  co  m*/
     * Converts the length value from meter to feet.
     *
     * @param meters value in meters
     * @return value in feets
     */
    public static int convertMeter2Feet(int meters) {
        return Math.round(meters / 0.30479f);
    }
}

Related Tutorials