FixedBinaryError with
INVALID_INPUT for NaN and ±infinity and OUT_OF_RANGE when the rounded value does not fit the storage.
Result!(FixedBinary, FixedBinaryError) fromDouble(double value,
RoundingMode mode = RoundingMode.NEAREST_EVEN) static @safe pure nothrow @nogcConverts a finite double, rounded to the nearest representable value per mode (default NEAREST_EVEN; use HALF_AWAY to match the tested Wayland 1.26.0 conversion). The scaling is exact, so ties are decided exactly.
value | the floating-point value. |
mode | how sub-quantum remainders round. |
FixedBinaryError with
INVALID_INPUT for NaN and ±infinity and OUT_OF_RANGE when the rounded value does not fit the storage.