Packagesekati.math
Classpublic class IntBase

IntBase provides a common Integer API.



Public Methods
 MethodDefined by
  
IntBase Static Constructor
IntBase
  
compare(alpha:int, beta:int):int
[static]
IntBase
  
equalTo(alpha:int, beta:int):Boolean
[static]
IntBase
  
greaterThan(alpha:int, beta:int):Boolean
[static]
IntBase
  
lessThan(alpha:int, beta:int):Boolean
[static]
IntBase
  
rol(x:int, n:int):int
[static] Rotates x left n bits
IntBase
  
ror(x:int, n:int):uint
[static] Rotates x right n bits
IntBase
  
toHex(n:int, bigEndian:Boolean = false):String
[static] Outputs the hex value of a int, allowing the developer to specify the endinaness in the process.
IntBase
Public Constants
 ConstantDefined by
  HEX_CHARACTERS : String = "0123456789abcdef"
[static] String for quick lookup of a hex character based on index
IntBase
Constructor detail
IntBase()constructor
public function IntBase()

IntBase Static Constructor

Method detail
compare()method
public static function compare(alpha:int, beta:int):intParameters
alpha:int
 
beta:int

Returns
int
equalTo()method 
public static function equalTo(alpha:int, beta:int):BooleanParameters
alpha:int
 
beta:int

Returns
Boolean
greaterThan()method 
public static function greaterThan(alpha:int, beta:int):BooleanParameters
alpha:int
 
beta:int

Returns
Boolean
lessThan()method 
public static function lessThan(alpha:int, beta:int):BooleanParameters
alpha:int
 
beta:int

Returns
Boolean
rol()method 
public static function rol(x:int, n:int):int

Rotates x left n bits

Parameters
x:int
 
n:int

Returns
int
ror()method 
public static function ror(x:int, n:int):uint

Rotates x right n bits

Parameters
x:int
 
n:int

Returns
uint
toHex()method 
public static function toHex(n:int, bigEndian:Boolean = false):String

Outputs the hex value of a int, allowing the developer to specify the endinaness in the process. Hex output is lowercase.

Parameters
n:int — The int value to output as hex
 
bigEndian:Boolean (default = false) — Flag to output the int as big or little endian

Returns
String — A string of length 8 corresponding to the hex representation of n ( minus the leading "0x" )
Constant detail
HEX_CHARACTERSconstant
public static const HEX_CHARACTERS:String = "0123456789abcdef"

String for quick lookup of a hex character based on index