Converts kilometers per hour to meters per second - Java java.lang

Java examples for java.lang:Math Convert

Description

Converts kilometers per hour to meters per second

Demo Code


//package com.java2s;

public class Main {
    /**//from  w w  w.j  a  v  a  2  s  . c  o m
     * Converts kilometers per hour to meters per second
     *
     * @param kmph speed in km/h
     * @return speed in m/s
     */
    public static double kmphToMps(double kmph) {
        return kmph / 3.6;
    }
}

Related Tutorials