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

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

Deno / TypeScript to Ethereum Connector
Latest
method BigNumber.prototype.negated
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 negated, i.e. multiplied by -1.

x = new BigNumber(1.8)
x.negated()                     // '-1.8'
y = new BigNumber(-1.3)
y.negated()                     // '1.3'