/** * Converts an integer or `Moontoast\Math\BigNumber` integer representation * into a hexadecimal string representation * * @param int|string|BigNumber $integer An integer or `Moontoast\Math\BigNumber` * @return string Hexadecimal string */ public function toHex($integer) { if (!$integer instanceof BigNumber) { $integer = new BigNumber($integer); } return BigNumber::convertFromBase10($integer, 16); }
public function toHex($integer) { if (!$integer instanceof \Moontoast\Math\BigNumber) { $integer = new \Moontoast\Math\BigNumber($integer); } return \Moontoast\Math\BigNumber::convertFromBase10($integer, 16); }