Contents

UnitLength

A unit of measure for length.

Declaration

class UnitLength

Overview

You typically use instances of UnitLength 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 UnitLength class defines its baseUnit() 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

au

1.496e+11

Parsecs

Parsecs

pc

3.086e+16

Topics

Accessing the Base Unit

Accessing Predefined Units

Initializers

See Also

Physical Dimension