IntUtils class
Utility class for integer-related operations and conversions.
Constructors
- IntUtils()
Properties
- hashCode → int
- 
  The hash code for this object.
  no setterinherited
- runtimeType → Type
- 
  A representation of the runtime type of the object.
  no setterinherited
Methods
- 
  noSuchMethod(Invocation invocation) → dynamic 
- 
  Invoked when a nonexistent method or property is accessed.
  inherited
- 
  toString() → String 
- 
  A string representation of this object.
  inherited
Operators
- 
  operator ==(Object other) → bool 
- 
  The equality operator.
  inherited
Static Methods
- 
  bitlengthInBytes(int val) → int 
- Calculates the number of bytes required to represent the bit length of an integer value.
- 
  cos(num x) → double 
- 
  decodeVarint(List< int> byteint) → Tuple<int, int> 
- Decodes a variable-length byte array into an integer value according to Bitcoin's variable-length integer encoding scheme.
- 
  encodeVarint(int i) → List< int> 
- Encodes an integer into a variable-length byte array according to Bitcoin's variable-length integer encoding scheme.
- 
  exp(num x) → double 
- 
  fromBytes(List< int> bytes, {Endian byteOrder = Endian.big, bool sign = false}) → int
- Converts a list of bytes to an integer, following the specified byte order.
- 
  log(num x) → double 
- 
  max(int a, int b) → int 
- 
  min(int a, int b) → int 
- 
  parse(dynamic v, {bool allowHex = true}) → int 
- 
  Parses a dynamic value vinto an integer.
- 
  pow(num x, num exponent) → num 
- 
  prependVarint(List< int> data) → List<int> 
- Prepends a variable-length integer encoding of the given data length to the provided data.
- 
  sqrt(num x) → double 
- 
  toBytes(int val, {required int length, Endian byteOrder = Endian.big}) → List< int> 
- Converts an integer to a byte list with the specified length and endianness.
- 
  tryParse(dynamic v, {bool allowHex = true}) → int? 
- 
  Tries to parse a dynamic value vinto an integer, returning null if parsing fails.