Skip to content
This repository has been archived by the owner on Sep 8, 2022. It is now read-only.

Commit

Permalink
Add Kilowatt power unit
Browse files Browse the repository at this point in the history
  • Loading branch information
davedelong committed Jul 25, 2015
1 parent f9004f6 commit a04e56b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion DDUnitConverter/DDPowerUnitConverter.h
Expand Up @@ -21,7 +21,8 @@ typedef NS_ENUM(NSInteger, DDPowerUnit) {
DDPowerUnitMetricHorsepower,
DDPowerUnitJoulesPerSecond,
DDPowerUnitKilogramForceMetersPerSecond,
DDPowerUnitWatts
DDPowerUnitWatts,
DDPowerUnitKilowatts
};

@interface DDPowerUnitConverter : DDUnitConverter
Expand Down
2 changes: 2 additions & 0 deletions DDUnitConverter/DDPowerUnitConverter.m
Expand Up @@ -34,6 +34,8 @@ + (NSDecimalNumber *)multiplierForUnit:(DDUnit)unit {
break;
case DDPowerUnitKilogramForceMetersPerSecond:
multiplier = [NSDecimalNumber gConstant_dd]; break;
case DDPowerUnitKilowatts:
multiplier = [NSDecimalNumber decimalNumberWithMantissa:1 exponent:3 isNegative:NO]; break;
default:
break;
}
Expand Down

0 comments on commit a04e56b

Please sign in to comment.