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

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

Deno / TypeScript to Ethereum Connector
Latest
method BigNumber.prototype.dividedBy
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 divided by n, rounded according to the current DECIMAL_PLACES and ROUNDING_MODE settings.

x = new BigNumber(355)
y = new BigNumber(113)
x.dividedBy(y)                  // '3.14159292035398230088'
x.dividedBy(5)                  // '71'
x.dividedBy(47, 16)             // '5'

Parameters

n: BigNumber.Value

A numeric value.

optional
base: number