Programming Guide
This programming guide serves as a reference on how to go about using the included api.
Table of Contents
Integer Checks
Contains:
isWholeNumber
Checks if the number is whole or not.
NSDecimalNumber *number = [NSDecimalNumber decimalNumberWithString:@"64"];
BOOL isWholeNumber = [JOEMath isWholeNumber:number];
isEven
Checks if the number is even or not.
NSUInteger integer = 64;
BOOL isEvenNumber = [JOEMath isEven:integer];
isOdd
Checks if the number is odd or not.
NSUInteger integer = 65;
BOOL isOddNumber = [JOEMath isOdd:integer];
Division Operations
Contains:
isDivisibleBy
Checks if number is divisible by all divisors in a set.
NSSet *numbers = [NSSet setWithObjects:@(6), @(12), @(18), @(144), nil];
[JOEMath integer:288 isDivisibleByDivisorsInSet:numbers];
Returns YES, because 288 is in fact divisible by all the numbers in the given set.