@twinfinity/core
    Preparing search index...

    Class Uint32Bytes

    Provides methods to manipulate and read individual and bytes in the uint3. of a typed array Uint32Array.

    Index

    Constructors

    Accessors

    Methods

    Constructors

    Accessors

    • get isChanged(): boolean

      Whether the number this instance is working with has changed started working with it.

      Returns boolean

    • get value(): number

      Get the current uint32 number that this instance is currently working with.

      Returns number

    • set value(v: number): void

      Replace the current uint32 number that this instance is currently working with.

      Parameters

      • v: number

      Returns void

    Methods

    • Copies the bytes in src into the current uint32 number starting at byte position 0 and ending at 3. If src cannot provide 4 bytes of data only as much as possible with be copied.

      Parameters

      • src: ArrayLike<number>

        Src array to copy from

      • srcOffset: number = 0

        Offset in src to copy from

      Returns Uint32Bytes

      Uint32Bytes instance.

    • Copies the bytes values of the current uint32 number into dst. If dst cannot accomodate all the numbers only so many numbers are copied that can fit in dst.

      Parameters

      • dst: Writeable<ArrayLike<number>>

        Destination array to write numbers to

      • dstOffset: number = 0

        offset dst to write numbers to

      Returns ArrayLike<number>

      dst.

    • Get the value at the byte offset specified by offset.

      Parameters

      • offset: number

        byte offset in the current uint32 number. 0 .. 3

      Returns number

      Byte value at offset

    • Set the value at the byte offset specified by offset.

      Parameters

      • offset: number

        byte offset in the current uint32 number. 0 .. 3

      • v: number

        byte value to set. Should be 0..255

      Returns void