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

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

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

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

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

Parameters

n: BigNumber.Value

A numeric value.

optional
base: number

Returns

boolean