Documentation

BigNumberConverter
in package
implements NumberConverterInterface

BigNumberConverter converts UUIDs from hexadecimal characters into moontoast/math `BigNumber` representations of integers and vice versa

Interfaces, Classes and Traits

NumberConverterInterface
NumberConverterInterface converts UUIDs from hexadecimal characters into representations of integers and vice versa

Table of Contents

fromHex()  : BigNumber
Converts a hexadecimal number into a `Moontoast\Math\BigNumber` representation
toHex()  : string
Converts an integer or `Moontoast\Math\BigNumber` integer representation into a hexadecimal string representation

Methods

fromHex()

Converts a hexadecimal number into a `Moontoast\Math\BigNumber` representation

public fromHex(string $hex) : BigNumber
Parameters
$hex : string

The hexadecimal string representation to convert

Return values
BigNumber

toHex()

Converts an integer or `Moontoast\Math\BigNumber` integer representation into a hexadecimal string representation

public toHex(int|string|BigNumber $integer) : string
Parameters
$integer : int|string|BigNumber

An integer or Moontoast\Math\BigNumber

Return values
string

Hexadecimal string

Search results