pub fn cswap<T: Integer + Copy>(x: T, y: T, c: T) -> (T, T)
Expand description

Function that is not part of the language but is offered as a helper for tests, etc. Conditional, constant-time swapping. Returns (x, y) if c == 0 and (y, x) if c == T::max. The return value is undefined if c has any other value.