Java KMH Convert msToKmh(final float ms)

Here you can find the source of msToKmh(final float ms)

Description

Converts a speed given in meter per second to kilometer per hour.

License

Open Source License

Parameter

Parameter Description
ms The value to convert in meter per second

Return

The converted value in kilometer per hour

Declaration

public static float msToKmh(final float ms) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**//from w  w w. ja  v  a  2 s  .com
     * Factor to multiply with for conversion from meter per second to kilometer
     * per hour.
     */
    private static final float MS_TO_KMH = 3.6f;

    /**
     * Converts a speed given in meter per second to kilometer per hour.
     * 
     * @param ms
     *            The value to convert in meter per second
     * @return The converted value in kilometer per hour
     */
    public static float msToKmh(final float ms) {
        return ms * MS_TO_KMH;
    }
}

Related

  1. kmhToKnots(Double kmh)
  2. kmhToMps(Double kmh)
  3. kmhToMs(long kmh)
  4. knotsToKmh(Double knots)
  5. kntsToKmh(int knots)
  6. msToKmh(float ms)