Scalar.float64Bits constructor
Scalar.float64Bits( - int bits
)
Implementation
factory Scalar.float64Bits(int bits) {
final maximum = (BigInt.one << 64) - BigInt.one;
final minimumSigned = -(BigInt.one << 63);
var value = BigInt.from(bits);
if (value < minimumSigned || value > maximum) {
throw RangeError.value(bits, 'bits', 'must be a 64-bit bit pattern');
}
if (value.isNegative) value += BigInt.one << 64;
return Scalar._(const Float64Type(), {
'floatBits': value.toRadixString(16).padLeft(16, '0'),
});
}