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

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

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

Returns a BigNumber whose value is the integer part of dividing the value of this BigNumber by n.

x = new BigNumber(5)
y = new BigNumber(3)
x.idiv(y)                       // '1'
x.idiv(0.7)                     // '7'
x.idiv('0.f', 16)               // '5'

Parameters

n: BigNumber.Value

A numeric value.

optional
base: number

Returns

BigNumber