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

x/web3/types/bignumber.d.ts>BigNumber#isGreaterThan

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

Returns true if the value of this BigNumber is greater than the value of n, otherwise returns false.

0.1 > (0.3 - 0.2)                             // true
x = new BigNumber(0.1)
x.isGreaterThan(BigNumber(0.3).minus(0.2))    // false
BigNumber(0).isGreaterThan(x)                 // false
BigNumber(11, 3).isGreaterThan(11.1, 2)       // true

Parameters

n: BigNumber.Value

A numeric value.

optional
base: number

Returns

boolean