Converts the speed value from m/s to km/h. - Java java.lang

Java examples for java.lang:Math Convert

Description

Converts the speed value from m/s to km/h.

Demo Code


//package com.java2s;

public class Main {
    /**/*from  w  w w.j  a  v a 2s .  co m*/
     * Converts the speed value from m/s to km/h.
     *
     * @param meterPerSecond speed value in m/s
     * @return speed value in km/h
     */
    public static float convertMeterPerSecond2KilometerPerHour(
            float meterPerSecond) {
        return meterPerSecond * 3.6f;
    }
}

Related Tutorials