Here you can find the source of kelvinToCelsius(double temperature)
public static double kelvinToCelsius(double temperature)
//package com.java2s; //License from project: Apache License import java.math.BigDecimal; public class Main { public static double kelvinToCelsius(double temperature) { return scaleTemperature(temperature - 273.15); }//w ww .java2 s . co m public static double scaleTemperature(double value) { return new BigDecimal(value).setScale(1, BigDecimal.ROUND_HALF_EVEN).intValue(); } }