avg

Git Source

Calculates the arithmetic average of x and y.

*Notes:

  • The result is rounded toward zero.*
function avg(SD49x28 x, SD49x28 y) pure returns (SD49x28 result);

Parameters

NameTypeDescription
xSD49x28The first operand as an SD49x28 number.
ySD49x28The second operand as an SD49x28 number.

Returns

NameTypeDescription
resultSD49x28The arithmetic average as an SD49x28 number.