Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/web3/types/bignumber.d.ts>BigNumber.max

Deno / TypeScript to Ethereum Connector
Latest
method BigNumber.max
import { BigNumber } from "https://deno.land/x/web3@v0.11.1/types/bignumber.d.ts";

Returns a BigNumber whose value is the maximum of the arguments.

The return value is always exact and unrounded.

x = new BigNumber('3257869345.0378653')
BigNumber.max(4e9, x, '123456789.9')      // '4000000000'

arr = [12, '13', new BigNumber(14)]
BigNumber.max.apply(null, arr)            // '14'

Parameters

...n: BigNumber.Value[]

A numeric value.