Trait sway_libs::signed_integers::common::TwosComplement
pub trait TwosComplement {
/// Returns the two's complement of a value.
///
/// # Returns
///
/// * [Self] - The value as two's complement.
fn twos_complement(self) -> Self;
}
Expand description
Trait for the Two’s Complement of a value.
Required Methods
fn twos_complement(self) -> Self
fn twos_complement(self) -> Self
Returns the two’s complement of a value.
Returns
- [Self] - The value as two’s complement.