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

Java examples for java.lang:Math Convert

Description

Converts the length value from feet to meter.

Demo Code


//package com.java2s;

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

Related Tutorials