BitRotate
Rotate the bits of an unsigned integer of type T
Fully qualified path: alexandria_math::BitRotate
pub trait BitRotate<T>
Trait functions
rotate_left
Take the bits of an unsigned integer and rotate in the left direction
Arguments
x- rotate its bit representation in the leftward directionn- number of steps to rotate
Returns
T- the result of rotating the bits of numberxleft,nnumber of steps
Fully qualified path: alexandria_math::BitRotate::rotate_left
fn rotate_left(x: T, n: T) -> T
rotate_right
Take the bits of an unsigned integer and rotate in the right direction
Arguments
x- rotate its bit representation in the rightward directionn- number of steps to rotate
Returns
T- the result of rotating the bits of numberxright,nnumber of steps
Fully qualified path: alexandria_math::BitRotate::rotate_right
fn rotate_right(x: T, n: T) -> T