Platforms to show: All Mac Windows Linux Cross-Platform

Back to MemoryBlock class.

MemoryBlock.Float16ValueMBS(offset as integer) as Single   New in 26.5

Type Topic Plugin Version macOS Windows Linux iOS Targets
method MemoryBlock MBS Util Plugin 26.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads a 16 bit float from a memoryblock.

A floating point number in 2 bytes to save space. One bit for sign, 5 for exponent and 11 for mantissa. About 3 digits precision.

See also:

MemoryBlock.Float16ValueMBS(offset as integer, assigns value as Single)   New in 26.5

Type Topic Plugin Version macOS Windows Linux iOS Targets
method MemoryBlock MBS Util Plugin 26.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Assigns a floating point value to 16 bit float in the memoryblock.
Example
// write values and read them

Var m As New MemoryBlock(16)

m.DoubleValue(0) = 123.456789
m.Float16ValueMBS(8) = 123.456789
m.SingleValue(12) = 123.456789

MessageBox _
m.Float16ValueMBS(8).ToString("0.000000")+_
EndOfLine+_
m.SingleValue(12).ToString("0.000000")+_
EndOfLine+_
m.DoubleValue(0).ToString("0.000000")

See also:

Blog Entries

The items on this page are in the following plugins: MBS Util Plugin.


The biggest plugin in space...