Instance Method

unitMultipliedByUnit:

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

Declaration

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

Parameters

unit

The unit to be multiplied.

Return Value

A new, complex unit.

Discussion

You can create a complex unit by multiplying two units together. For example, you could create a foot-pound unit by multiplying a foot unit by a pound unit as shown below.

HKUnit *foot = [HKUnit footUnit];
HKUnit *pound = [HKUnit poundUnit];
HKUnit *footPound = [foot unitMultipliedByUnit:pound];

See Also

Performing Unit Math

- unitDividedByUnit:

Creates a complex unit by dividing the receiving unit by 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.