Converts knots to kilometers per hour - Java java.lang

Java examples for java.lang:Math Convert

Description

Converts knots to kilometers per hour

Demo Code


//package com.java2s;

public class Main {
    private static final double KNOTS_TO_KPH_RATIO = 1.852;

    /**//from w w w .j a  v  a2 s. co  m
     * Converts knots to kilometers per hour
     *
     * @param knots speed in Knots
     * @return speed in km/h
     */
    public static double knotToKmph(double knots) {
        return knots * KNOTS_TO_KPH_RATIO;
    }
}

Related Tutorials