Skip to content

SignedSafeDecimalMath

Description

Source: contracts/SignedSafeDecimalMath.sol

Variables

PRECISE_UNIT

Source

Type: int256

UNIT

Source

Type: int256

decimals

Source

Type: uint8

highPrecisionDecimals

Source

Type: uint8

Views

preciseUnit

Source

Details

Signature

preciseUnit() pure returns (int256)

Visibility

external

State Mutability

pure

unit

Source

Details

Signature

unit() pure returns (int256)

Visibility

external

State Mutability

pure

Internal Functions

decimalToPreciseDecimal

Source

Details

Signature

decimalToPreciseDecimal(int256 i) pure returns (int256)

Visibility

internal

State Mutability

pure

divideDecimal

Source

Details

Signature

divideDecimal(int256 x, int256 y) pure returns (int256)

Visibility

internal

State Mutability

pure

divideDecimalRound

Source

Details

Signature

divideDecimalRound(int256 x, int256 y) pure returns (int256)

Visibility

internal

State Mutability

pure

divideDecimalRoundPrecise

Source

Details

Signature

divideDecimalRoundPrecise(int256 x, int256 y) pure returns (int256)

Visibility

internal

State Mutability

pure

multiplyDecimal

Source

Details

Signature

multiplyDecimal(int256 x, int256 y) pure returns (int256)

Visibility

internal

State Mutability

pure

multiplyDecimalRound

Source

Details

Signature

multiplyDecimalRound(int256 x, int256 y) pure returns (int256)

Visibility

internal

State Mutability

pure

multiplyDecimalRoundPrecise

Source

Details

Signature

multiplyDecimalRoundPrecise(int256 x, int256 y) pure returns (int256)

Visibility

internal

State Mutability

pure

preciseDecimalToDecimal

Source

Details

Signature

preciseDecimalToDecimal(int256 i) pure returns (int256)

Visibility

internal

State Mutability

pure