UintArrayOps

Functions

sum

function sum(
    uint256[] array
) internal returns (uint256 _sum)

Parameters

NameTypeDescription

array

uint256[]

signedDifference

function signedDifference(
    uint256[] a,
    uint256[] b
) internal returns (int256[] _difference)

Parameters

NameTypeDescription

a

uint256[]

b

uint256[]

positiveDifference

function positiveDifference(
    uint256[] a,
    uint256[] b
) internal returns (uint256[] _positiveDifference)

given two int arrays a & b, returns an array c such that c[i] = a[i] - b[i], with negative values truncated to 0

Parameters

NameTypeDescription

a

uint256[]

b

uint256[]

Last updated