MCPcopy Index your code
hub / github.com/shopspring/decimal / IntPart

Method IntPart

decimal.go:1413–1416  ·  view source on GitHub ↗

IntPart returns the integer component of the decimal.

()

Source from the content-addressed store, hash-verified

1411
1412// IntPart returns the integer component of the decimal.
1413func (d Decimal) IntPart() int64 {
1414 scaledD := d.rescale(0)
1415 return scaledD.value.Int64()
1416}
1417
1418// BigInt returns integer component of the decimal as a BigInt.
1419func (d Decimal) BigInt() *big.Int {

Callers 7

TestIntPartFunction · 0.80
TestDecimal_CoefficientFunction · 0.80
ExpHullAbrhamMethod · 0.80
SinMethod · 0.80
CosMethod · 0.80
TanMethod · 0.80

Calls 1

rescaleMethod · 0.95

Tested by 3

TestIntPartFunction · 0.64
TestDecimal_CoefficientFunction · 0.64