Class

UnitSpeed

A unit of measure for speed.

Declaration

class UnitSpeed : Dimension

Overview

You typically use instances of NSUnitSpeed to represent specific quantities of speed using the NSMeasurement class.

Speed

Speed is the magnitude of velocity, or the rate of change of position. Speed can be expressed by SI derived units in terms of meters per second (m/s), and is also commonly expressed in terms of kilometers per hour (km/h) and miles per hour (mph).

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

Name

Method

Symbol

Coefficient

Meters Per Second

metersPerSecond

m/s

1.0

Kilometers Per Hour

kilometersPerHour

km/h

0.277778

Miles Per Hour

milesPerHour

mph

0.44704

Knots

knots

kn

0.514444

Topics

Accessing Predefined Units

class var metersPerSecond: UnitSpeed

Returns the meter per second unit of speed.

class var kilometersPerHour: UnitSpeed

Returns the kilometers per hour unit of speed.

class var milesPerHour: UnitSpeed

Returns the miles per hour unit of speed.

class var knots: UnitSpeed

Returns the knots unit of speed.

Relationships

Inherits From

See Also

Time and Motion

class UnitAcceleration

A unit of measure for acceleration.

class UnitDuration

A unit of measure for duration of time.

class UnitFrequency

A unit of measure for frequency.

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