saturating_add_pos()

The saturating_add_pos function adds two numbers, saturating at 0 and 2147483647 instead of overflowing.

For more information about saturating math functions, see the saturating math docs.

Required arguments

NameTypeDescription
xINTAn integer to add to y
yINTAn integer to add to x

Returns

ColumnTypeDescription
saturating_add_posINTThe result of x+y, saturating at 0 for the minimum bound

Found an issue on this page?

Report an issue!

Related Content