Scalar.float16Bits constructor

Scalar.float16Bits(
  1. int bits
)

Implementation

factory Scalar.float16Bits(int bits) {
  if (bits < 0 || bits > 0xffff) {
    throw RangeError.range(bits, 0, 0xffff, 'bits');
  }
  return Scalar._(const Float16Type(), {
    'floatBits': bits.toRadixString(16).padLeft(4, '0'),
  });
}