Class

UnitTemperature

A unit of measure for temperature.

Declaration

class UnitTemperature : Dimension

Overview

You typically use instances of NSUnitTemperature to represent specific quantities of temperature using the NSMeasurement class.

Temperature

Temperature is a comparative measure of thermal energy. The SI unit for temperature is the kelvin (K), which is defined in terms of the triple point of water. Temperature is also commonly measured by degrees of various scales, including Celsius (°C) and Fahrenheit (°F).

The NSUnitTemperature class defines its base unit to be kelvin, and provides the following units, which are initialized using UnitConverterLinear converters with the specified coefficients and constants:

Name

Method

Symbol

Coefficient

Constant

Kelvin

kelvin

K

1

0

Degree Celsius

celsius

°C

1.0

273.15

Degree Fahrenheit

fahrenheit

°F

0.55555555555556

255.37222222222427

Topics

Accessing Predefined Units

class var kelvin: UnitTemperature

Returns the kelvin unit of temperature.

class var celsius: UnitTemperature

Returns the degree Celsius unit of temperature.

class var fahrenheit: UnitTemperature

Returns the degree Fahrenheit unit of temperature.

Relationships

Inherits From

See Also

Energy, Heat, and Light

class UnitEnergy

A unit of measure for energy.

class UnitPower

A unit of measure for power.

class UnitIlluminance

A unit of measure for luminance.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software