pub trait OverflowingSquare {
type Output;
// Required method
fn overflowing_square(self) -> (Self::Output, bool);
}
Expand description
Squares a number.
Returns a tuple of the sum along with a boolean indicating whether an arithmetic overflow
occurred. If an overflow occurred, then the wrapped number is returned.
Squares a number.
Returns a tuple containing the result and a boolean indicating whether an arithmetic
occurred. If an overflow occurred, then the wrapped value is returned.
§Worst-case complexity
Constant time and additional memory.
§Examples
See here.
Squares a number.
Returns a tuple containing the result and a boolean indicating whether an arithmetic
occurred. If an overflow occurred, then the wrapped value is returned.
§Worst-case complexity
Constant time and additional memory.
§Examples
See here.
Squares a number.
Returns a tuple containing the result and a boolean indicating whether an arithmetic
occurred. If an overflow occurred, then the wrapped value is returned.
§Worst-case complexity
Constant time and additional memory.
§Examples
See here.
Squares a number.
Returns a tuple containing the result and a boolean indicating whether an arithmetic
occurred. If an overflow occurred, then the wrapped value is returned.
§Worst-case complexity
Constant time and additional memory.
§Examples
See here.
Squares a number.
Returns a tuple containing the result and a boolean indicating whether an arithmetic
occurred. If an overflow occurred, then the wrapped value is returned.
§Worst-case complexity
Constant time and additional memory.
§Examples
See here.
Squares a number.
Returns a tuple containing the result and a boolean indicating whether an arithmetic
occurred. If an overflow occurred, then the wrapped value is returned.
§Worst-case complexity
Constant time and additional memory.
§Examples
See here.
Squares a number.
Returns a tuple containing the result and a boolean indicating whether an arithmetic
occurred. If an overflow occurred, then the wrapped value is returned.
§Worst-case complexity
Constant time and additional memory.
§Examples
See here.
Squares a number.
Returns a tuple containing the result and a boolean indicating whether an arithmetic
occurred. If an overflow occurred, then the wrapped value is returned.
§Worst-case complexity
Constant time and additional memory.
§Examples
See here.
Squares a number.
Returns a tuple containing the result and a boolean indicating whether an arithmetic
occurred. If an overflow occurred, then the wrapped value is returned.
§Worst-case complexity
Constant time and additional memory.
§Examples
See here.
Squares a number.
Returns a tuple containing the result and a boolean indicating whether an arithmetic
occurred. If an overflow occurred, then the wrapped value is returned.
§Worst-case complexity
Constant time and additional memory.
§Examples
See here.
Squares a number.
Returns a tuple containing the result and a boolean indicating whether an arithmetic
occurred. If an overflow occurred, then the wrapped value is returned.
§Worst-case complexity
Constant time and additional memory.
§Examples
See here.
Squares a number.
Returns a tuple containing the result and a boolean indicating whether an arithmetic
occurred. If an overflow occurred, then the wrapped value is returned.
§Worst-case complexity
Constant time and additional memory.
§Examples
See here.