peekDM

Takes an array of DM ushort and converts the first T.sizeof / 2 DM to T. The array is **not** consumed.

  1. T peekDM(ushort[] words)
    T
    peekDM
    (
    T
    )
    (
    ushort[] words
    )
  2. T peekDM(ushort[] words, size_t index)

Parameters

T

The integral type to convert the first T.sizeof / 2 words to.

words ushort[]

The array of DM to convert

Examples

ushort[] words = [0x645A, 0x3ffb];
words.peekDM!float.shouldEqual(1.964F);
words.length.shouldEqual(2);

ushort[] odd = [0x645A, 0x3ffb, 0xffaa];
odd.peekDM!float.shouldEqual(1.964F);
odd.length.shouldEqual(3);

Meta