Numbers.h 1015 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #import "Types.h"
  2. @interface Numbers : NSObject
  3. + (FUNCTION2)min;
  4. + (FUNCTION2)max;
  5. + (FUNCTION2)sum;
  6. + (FUNCTION2)average;
  7. + (FUNCTION2)multiplyBy;
  8. + (FUNCTION1)multiplyBy:(NSNumber *)number;
  9. + (FUNCTION2)divideBy;
  10. + (FUNCTION1)divideBy:(NSNumber *)divisor;
  11. + (FUNCTION2)add;
  12. + (FUNCTION1)add:(NSNumber *)addition;
  13. + (FUNCTION2)subtract;
  14. + (FUNCTION1)substract:(NSNumber *)subtractor;
  15. @end
  16. static FUNCTION2 TL_max() {
  17. return [Numbers max];
  18. }
  19. static FUNCTION2 TL_min() {
  20. return [Numbers min];
  21. }
  22. static FUNCTION2 TL_sum() {
  23. return [Numbers sum];
  24. }
  25. static FUNCTION2 TL_average() {
  26. return [Numbers average];
  27. }
  28. static FUNCTION1 TL_multiplyBy(NSNumber *multiplier) {
  29. return [Numbers multiplyBy:multiplier];
  30. }
  31. static FUNCTION1 TL_divideBy(NSNumber *divisor) {
  32. return [Numbers divideBy:divisor];
  33. }
  34. static FUNCTION1 TL_add(NSNumber *addition) {
  35. return [Numbers add:addition];
  36. }
  37. static FUNCTION1 TL_subtract(NSNumber *subtractor) {
  38. return [Numbers substract:subtractor];
  39. }