Java KMH Convert kmhToKnots(Double kmh)

Here you can find the source of kmhToKnots(Double kmh)

Description

Converts kilometers per hour to knots.

License

Open Source License

Declaration

public static Double kmhToKnots(Double kmh) 

Method Source Code

//package com.java2s;
/**//ww w. j av a 2 s  .  co  m
 * Copyright (c) 2010-2018 by the respective copyright holders.
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 */

import java.math.BigDecimal;

public class Main {
    private static final BigDecimal KMH_TO_KNOTS = new BigDecimal("0.539956803");

    /**
     * Converts kilometers per hour to knots.
     */
    public static Double kmhToKnots(Double kmh) {
        return kmh == null ? null : new BigDecimal(kmh).multiply(KMH_TO_KNOTS).doubleValue();
    }
}

Related

  1. kmh2ms(double kmh)
  2. kmhToMps(Double kmh)
  3. kmhToMs(long kmh)
  4. knotsToKmh(Double knots)
  5. kntsToKmh(int knots)