Java Celsius to Kelvin toKelvin(double c)

Here you can find the source of toKelvin(double c)

Description

William Thomson, also know as Lord Kelvin, a British scientist who made important discoveries about heat in the 1800's.

License

Open Source License

Parameter

Parameter Description
c degrees Celsius

Return

Kelvin temperature (techincally not degrees)

Declaration

public static double toKelvin(double c) 

Method Source Code

//package com.java2s;
/*// w w w. ja v  a  2  s .  c  o m
 * TemperatureUtils.java
 *
 * Created on March 30, 2006, 10:40 PM
 *
 * Copyright (c) 2006, Pat Farrell. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License. * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

public class Main {
    /**
     * William Thomson, also know as Lord Kelvin, a British scientist who made important discoveries 
     * about heat in the 1800's. Scientists have determined that the coldest it can get, in theory, 
     * is minus 273.15 degrees Celsius. This temperature has never actually been reached, though 
     * scientists have come close. The value, minus 273.15 degrees Celsius, is called absolute zero.
     * @param c degrees Celsius
     * @return Kelvin temperature (techincally not degrees)
     */
    public static double toKelvin(double c) {
        return c + 273.15f;
    }
}