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

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

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

Returns a BigNumber whose value is the value of this BigNumber minus n.

The return value is always exact and unrounded.

0.3 - 0.1                       // 0.19999999999999998
x = new BigNumber(0.3)
x.minus(0.1)                    // '0.2'
x.minus(0.6, 20)                // '0'

Parameters

n: BigNumber.Value

A numeric value.

optional
base: number