Class

UnitFuelEfficiency

A unit of measure for fuel efficiency.

Declaration

class UnitFuelEfficiency : Dimension

Overview

You typically use instances of NSUnitFuelEfficiency to represent specific quantities of fuel efficiency using the NSMeasurement class.

Fuel Efficiency

Fuel efficiency corresponds to the thermal efficiency of a process that converts the chemical potential energy of a fuel into kinetic energy. Fuel efficiency can be expressed by SI derived units in terms of cubic meters per meter (m3/m), but is more commonly expressed in terms of liters per kilometer (L/km) and miles per gallon (mpg).

The NSUnitFuelEfficiency class defines its base unit as litersPer100Kilometers, and provides the following units:

Name

Method

Symbol

Liters Per 100 Kilometers

litersPer100Kilometers

L/100km

Miles Per Gallon

milesPerGallon

mpg

Miles Per Imperial Gallon

milesPerImperialGallon

mpg

Topics

Accessing Predefined Units

class var milesPerImperialGallon: UnitFuelEfficiency

Returns the miles per imperial gallon unit of fuel efficiency.

class var litersPer100Kilometers: UnitFuelEfficiency

Returns the liter per 100 kilometers unit of fuel efficiency.

class var milesPerGallon: UnitFuelEfficiency

Returns the miles per gallon unit of fuel efficiency.

Relationships

Inherits From

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