Declared in NSNumber+BFKit.h

Overview

This category adds some useful methods to NSNumber

Tasks

Class Methods

isPowerOfTwo:

+ (BOOL)isPowerOfTwo:(NSInteger)number
Discussion

Returns if the number is a power of two

Parameters

number

Number to check

Return Value

Returns if the number is a power of two

Declared In

NSNumber+BFKit.h

nextPowerOfTwo:

+ (NSInteger)nextPowerOfTwo:(NSInteger)number
Discussion

Get the next power of two

Parameters

number

Number to be powered

Return Value

Returns the number powered

Declared In

NSNumber+BFKit.h

randomFloat

+ (CGFloat)randomFloat
Discussion

Create a random float

Return Value

Returns the created random float

Declared In

NSNumber+BFKit.h

randomFloatBetweenMin:andMax:

+ (CGFloat)randomFloatBetweenMin:(CGFloat)minValue andMax:(CGFloat)maxValue
Discussion

Create a random float between the given range

Parameters

minValue

Mininum random value

maxValue

Maxinum random value

Return Value

Returns the created random float

Declared In

NSNumber+BFKit.h

randomIntBetweenMin:andMax:

+ (NSInteger)randomIntBetweenMin:(NSInteger)minValue andMax:(NSInteger)maxValue
Discussion

Create a random integer between the given range

Parameters

minValue

Mininum random value

maxValue

Maxinum random value

Return Value

Returns the created random integer

Declared In

NSNumber+BFKit.h