Example #1
0
 /**
  * Converts a hexadecimal number into a `Moontoast\Math\BigNumber` representation
  *
  * @param string $hex The hexadecimal string representation to convert
  * @return BigNumber
  */
 public function fromHex($hex)
 {
     $number = BigNumber::convertToBase10($hex, 16);
     return new BigNumber($number);
 }
Example #2
0
 /**
  * @param string $hex
  */
 public function fromHex($hex)
 {
     $number = \Moontoast\Math\BigNumber::convertToBase10($hex, 16);
     return new \Moontoast\Math\BigNumber($number);
 }