From 21d3023a9b7b6aff68c1170e345951396b1c6cfd Mon Sep 17 00:00:00 2001 From: 单军华 Date: Tue, 31 Jul 2018 13:35:21 +0800 Subject: [PATCH] no message --- screendisplay/screendisplay/Classes/Category/ThirdCategory/NSDecimalNumber+Addtion.h | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 105 insertions(+), 0 deletions(-) diff --git a/screendisplay/screendisplay/Classes/Category/ThirdCategory/NSDecimalNumber+Addtion.h b/screendisplay/screendisplay/Classes/Category/ThirdCategory/NSDecimalNumber+Addtion.h new file mode 100755 index 0000000..0cea48c --- /dev/null +++ b/screendisplay/screendisplay/Classes/Category/ThirdCategory/NSDecimalNumber+Addtion.h @@ -0,0 +1,105 @@ +// +// NSDecimalNumber+Addtion.h +// ��������������� +// +// Created by xuliying on 15/10/15. +// Copyright (c) 2015��� xly. All rights reserved. +// + +#import <Foundation/Foundation.h> + +typedef NS_ENUM(NSInteger, calculationType) { + Add, + Subtract, + Multiply, + Divide +}; + + +typedef enum : NSInteger { + + LMJDY = NSOrderedDescending, // ��������� + LMJXY = NSOrderedAscending, // ��������� + LMJDD = NSOrderedSame, // ������ + +} LMJMoneyCompare; + +@interface NSDecimalNumber (Addtion) + + +/** + ��������������������� + + @param stringOrNumber1 ��������������� + @param type ������������ + @param stringOrNumber2 ��������������� + @param handler ������������ + + @return ������ + */ ++(NSDecimalNumber *)aDecimalNumberWithStringOrNumberOrDecimalNumber:(id)stringOrNumber1 type:(calculationType)type anotherDecimalNumberWithStringOrNumberOrDecimalNumber:(id)stringOrNumber2 andDecimalNumberHandler:(NSDecimalNumberHandler *)handler; + + +/** + 2������������������ + */ ++(NSComparisonResult)aDecimalNumberWithStringOrNumberOrDecimalNumber:(id)stringOrNumber1 compareAnotherDecimalNumberWithStringOrNumberOrDecimalNumber:(id)stringOrNumber2; + + +/** + ��������������������������������� + + */ ++(NSString *)stringWithDecimalNumber:(NSDecimalNumber *)str1 scale:(NSInteger)scale; + + +/** + ������ + + */ +extern NSComparisonResult StrNumCompare(id str1,id str2); + + +/** + ������������ + */ +extern NSDecimalNumber *handlerDecimalNumber(id strOrNum,NSRoundingMode mode,int scale); + + + +/** + ������ + */ +extern NSComparisonResult SNCompare(id strOrNum1,id strOrNum2); + + + +/** + ������������ + */ +extern NSDecimalNumber *SNAdd(id strOrNum1,id strOrNum2); +extern NSDecimalNumber *SNSub(id strOrNum1,id strOrNum2); +extern NSDecimalNumber *SNMul(id strOrNum1,id strOrNum2); +extern NSDecimalNumber *SNDiv(id strOrNum1,id strOrNum2); + + + +/** + ������������������������ + + */ +extern NSDecimalNumber *SNMin(id strOrNum1,id strOrNum2); +extern NSDecimalNumber *SNMax(id strOrNum1,id strOrNum2); + + +extern NSDecimalNumber *SNAdd_handler(id strOrNum1,id strOrNum2,NSRoundingMode mode,int scale); +extern NSDecimalNumber *SNSub_handler(id strOrNum1,id strOrNum2,NSRoundingMode mode,int scale); +extern NSDecimalNumber *SNMul_handler(id strOrNum1,id strOrNum2,NSRoundingMode mode,int scale); +extern NSDecimalNumber *SNDiv_handler(id strOrNum1,id strOrNum2,NSRoundingMode mode,int scale); + + +extern NSDecimalNumber *SNMin_handler(id strOrNum1,id strOrNum2,NSRoundingMode mode,int scale); +extern NSDecimalNumber *SNMax_handler(id strOrNum1,id strOrNum2,NSRoundingMode mode,int scale); + + +@end -- Gitblit v1.8.0