Class

UnitMass

A unit of measure for mass.

Declaration

class UnitMass : Dimension

Overview

You typically use instances of NSUnitMass to represent specific quantities of mass using the NSMeasurement class.

Mass

Mass is a fundamental property of matter that causes it to resist being accelerated by a force. The SI unit for mass is the kilogram (kg), which defined in terms of the mass of the international prototype kilogram.

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

Name

Method

Symbol

Coefficient

Kilograms

kilograms

kg

1.0

Grams

grams

g

0.001

Decigrams

decigrams

dg

0.0001

Centigrams

centigrams

cg

0.00001

Milligrams

milligrams

mg

0.000001

Micrograms

micrograms

µg

1e9

Nanograms

nanograms

ng

1e-12

Picograms

picograms

pg

1e-15

Ounces

ounces

oz

0.0283495

Pounds

pounds

lb

0.453592

Stones

stones

st

0.157473

Metric Tons

metricTons

t

1000

Short Tons

shortTons

ton

907.185

Carats

carats

ct

0.0002

Ounces Troy

ouncesTroy

oz t

0.03110348

Slugs

slugs

slug

14.5939

Topics

Accessing Predefined Units

class var kilograms: UnitMass

Returns the kilograms unit of mass.

class var grams: UnitMass

Returns the grams unit of mass.

class var decigrams: UnitMass

Returns the decigrams unit of mass.

class var centigrams: UnitMass

Returns the centigrams unit of mass.

class var milligrams: UnitMass

Returns the milligrams unit of mass.

class var micrograms: UnitMass

Returns the micrograms unit of mass.

class var nanograms: UnitMass

Returns the nanograms unit of mass.

class var picograms: UnitMass

Returns the picograms unit of mass.

class var ounces: UnitMass

Returns the ounces unit of mass.

class var stones: UnitMass

Returns the stone unit of mass.

class var metricTons: UnitMass

Returns the metric tons unit of mass.

class var shortTons: UnitMass

Returns the short tons unit of mass.

class var carats: UnitMass

Returns the carats unit of mass.

class var ouncesTroy: UnitMass

Returns the ounces troy unit of mass.

class var slugs: UnitMass

Returns the slugs unit of mass.

Relationships

Inherits From

See Also

Mass, Weight, and Force

class UnitPressure

A unit of measure for pressure.

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