Java KMH Convert kmhToMs(long kmh)

Here you can find the source of kmhToMs(long kmh)

Description

Convert kilometers/hour into meters/second.

License

LGPL

Parameter

Parameter Description
kmh The value to convert.

Return

in meters/second.

Declaration

public static long kmhToMs(long kmh) 

Method Source Code

//package com.java2s;
/**/* w  ww  .  j  ava 2 s.  c  o m*/
 * Offers various useful methods related to geopositionning.
 * <p>License: This library is under the GNU Lesser General Public License</p>
 *
 * @author Praplan Christophe
 * @author Velen Stephane
 * @version 1.0 <p>Geneva, the 23.03.2006
 */

public class Main {
    /**
     * Convert kilometers/hour into meters/second.
     *
     * @param kmh The value to convert.
     * @return in meters/second.
     */
    public static float kmhToMs(int kmh) {
        return (float) (kmh / 3.6);
    }

    /**
     * Convert kilometers/hour into meters/second.
     *
     * @param kmh The value to convert.
     * @return in meters/second.
     */
    public float kmhToMs(float kmh) {
        return (float) (kmh / 3.6);
    }

    /**
     * Convert kilometers/hour into meters/second.
     *
     * @param kmh The value to convert.
     * @return in meters/second.
     */
    public static long kmhToMs(long kmh) {
        return (long) (kmh / 3.6);
    }

    /**
     * Convert kilometers/hour into meters/second.
     *
     * @param kmh The value to convert.
     * @return in meters/second.
     */
    public static double kmhToMs(double kmh) {
        return kmh / 3.6;
    }
}

Related

  1. kmh2ms(double kmh)
  2. kmhToKnots(Double kmh)
  3. kmhToMps(Double kmh)
  4. knotsToKmh(Double knots)
  5. kntsToKmh(int knots)
  6. msToKmh(final float ms)
  7. msToKmh(float ms)