toHalf static method

int toHalf(
  1. double value
)

value as an IEEE half float's bits (rounded; clamped to its range).

Implementation

static int toHalf(double value) =>
    _halfOfBits(Uint32List.view((Float32List(1)..[0] = value).buffer)[0]);