Class

UnitLength

A unit of measure for length.

Declaration

class UnitLength : Dimension

Overview

You typically use instances of NSUnitLength to represent specific quantities of length using the NSMeasurement class.

Length

Length is the dimensional extent of matter. The SI unit for length is the meter (m), which is defined in terms of the distance traveled by light in a vacuum.

The NSUnitLength class defines its base unit as meters, and provides the following units, which are initialized using UnitConverterLinear converters with the specified coefficients:

Name

Method

Symbol

Coefficient

Megameters

megameters

Mm

1000000.0

Kilometers

kilometers

kM

1000.0

Hectometers

hectometers

hm

100.0

Decameters

decameters

dam

10.0

Meters

meters

m

1.0

Decimeters

decimeters

dm

0.1

Centimeters

centimeters

cm

0.01

Millimeters

millimeters

mm

0.001

Micrometers

micrometers

µm

0.000001

Nanometers

nanometers

nm

1e-9

Picometers

picometers

pm

1e-12

Inches

inches

in

0.0254

Feet

feet

ft

0.3048

Yards

yards

yd

0.9144

Miles

miles

mi

1609.34

Scandinavian Miles

scandinavianMiles

smi

10000

Light Years

lightyears

ly

9.461e+15

Nautical Miles

nauticalMiles

NM

1852

Fathoms

fathoms

ftm

1.8288

Furlongs

furlongs

fur

201.168

Astronomical Units

astronomicalUnits

ua

1.496e+11

Parsecs

parsecs

pc

3.086e+16

Topics

Accessing Predefined Units

class var megameters: UnitLength

Returns the megameters unit of length.

class var kilometers: UnitLength

Returns the kilometers unit of length.

class var hectometers: UnitLength

Returns the hectometers unit of length.

class var decameters: UnitLength

Returns the decameters unit of length.

class var meters: UnitLength

Returns the meters unit of length.

class var decimeters: UnitLength

Returns the decimeters unit of length.

class var centimeters: UnitLength

Returns the centimeters unit of length.

class var millimeters: UnitLength

Returns the millimeters unit of length.

class var micrometers: UnitLength

Returns the micrometers unit of length.

class var nanometers: UnitLength

Returns the nanometers unit of length.

class var picometers: UnitLength

Returns the picometers unit of length.

class var inches: UnitLength

Returns the inches unit of length.

class var feet: UnitLength

Returns the feet unit of length.

class var yards: UnitLength

Returns the yards unit of length.

class var miles: UnitLength

Returns the miles unit of length.

class var scandinavianMiles: UnitLength

Returns the Scandinavian miles unit of length.

class var lightyears: UnitLength

Returns the lightyears unit of length.

class var nauticalMiles: UnitLength

Returns the nautical miles unit of length.

class var fathoms: UnitLength

Returns the fathoms unit of length.

class var furlongs: UnitLength

Returns the furlongs unit of length.

class var astronomicalUnits: UnitLength

Returns the astronomical units unit of length.

class var parsecs: UnitLength

Returns the parsecs unit of length.

Relationships

Inherits From

See Also

Physical Dimension

class UnitArea

A unit of measure for area.

class UnitVolume

A unit of measure for volume.

class UnitAngle

A unit of measure for rotation.