Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c sharp right rotation

public static int RotateLeft(this int value, int count)
{
    uint val = (uint)value;
    return (int)((val << count) | (val >> (32 - count)));
}

public static int RotateRight(this int value, int count)
{
    uint val = (uint)value;
    return (int)((val >> count) | (val << (32 - count)));
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sharp #rotation
ADD COMMENT
Topic
Name
8+2 =