Instance Method

unitDividedByUnit:

Creates a complex unit by dividing the receiving unit by another unit.

Declaration

- (HKUnit *)unitDividedByUnit:(HKUnit *)unit;

Parameters

unit

The unit to be divided.

Return Value

A new, complex unit.

Discussion

This method creates a new, complex unit by dividing one unit by another. For example, you can create a meters-per-second unit by dividing a meters unit by a seconds unit, as shown below.

HKUnit *meters = [HKUnit meterUnit];
HKUnit *seconds = [HKUnit secondUnit];
HKUnit *metersPerSecond = [meters unitDividedByUnit:seconds];

See Also

Performing Unit Math

- unitMultipliedByUnit:

Creates a complex unit by multiplying the receiving unit with another unit.

- unitRaisedToPower:

Creates a complex unit by raising the unit to the given power.

- reciprocalUnit

Returns a complex unit representing the unit’s reciprocal.