Here you can find the source of kmhToKnots(Double kmh)
public static Double kmhToKnots(Double kmh)
//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(); } }