Skip to content
FutureBlitz

    Install

    Import std.math.bits

    RotateLeft

    std.math.bits

    function

    Public Function RotateLeft<T: Integer>(value: T, count: Int): T

    The bits moved count places up, those that go past the top coming in at the bottom. A negative count rotates down, and one past the type's width goes around.

    Examples

    Expect(RotateLeft(0x80000001 As UInt32, 1) == 3)
    Expect(RotateRight(1 As UInt8, 1) == 0x80)

    std/math/bits.fb, line 80

    Report an issue with this page or with FutureBlitz on GitHub.