[Issue 6829] Unsigned rotate standard function in Phobos
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jul 10 02:50:20 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=6829
--- Comment #7 from Iain Buclaw <ibuclaw at ubuntu.com> 2013-07-10 02:50:07 PDT ---
(In reply to comment #5)
> I think this should be a recognizable rotate left function:
>
> private static uint rol(in uint x, in uint y) pure nothrow {
> return (x << y) | (x >> (32 - y));
> }
And likewise for rotate right function:
uint
ror (in uint x, in uint y) pure nothrow
{
return (x >> y) | (x << (32 - y));
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list