saturating_sub_pos()

The saturating_sub_pos subtracts the second number from the first, 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 for y to subtract from
yINTAn integer to subtract from x

Returns

ColumnTypeDescription
saturating_sub_pos`INTThe result ofx-y`, saturating at 0 for the minimum bound

Found an issue on this page?

Report an issue!

Related Content