我正在尝试执行基本的 NSDecimal 数学运算,例如 NSDecimals 的加法和减法。这有可能实现吗?尝试使用 NSDecimalAdd 得到错误
NSDecimal' 到不兼容类型的参数'NSDecimal * _Nonnull'
_meat.colonyQueenObject.count.creatureCount = [colonyQueenNumber decimalValue];
-(void)adjustCountsCreatureCountforAddedCreatures:(NSDecimal)creaturesAdded meatCount:(NSDecimal)meatCount larvaCount:(NSDecimal)larvaCount creatureType: (int)creatureType{
NSDecimalAdd(_meat.colonyQueenObject.count.creatureCount, _meat.colonyQueenObject.count.creatureCount, &creaturesAdded, NSRoundBankers);
}
NSDecimalAdd(&_meat.colonyQueenObject.count.creatureCount, &_meat.colonyObject.count.creatureCount, &creaturesAdded, NSRoundBankers);
也失败了