RestoreRawNumber.checked: def of bendvy-ecs-core@0.1.0.4 Import: import bendvy-ecs-core@0.1.0.4/restore_raw_number.bend as RestoreRawNumber Lines 28-34 of bendvy-ecs-core@0.1.0.4/restore_raw_number.bend: https://jend.leeeet.dev/read.txt?path=bendvy-ecs-core@0.1.0.4/restore_raw_number.bend&start_line=28&end_line=34 import Base import bendvy-ecs-core@0.1.0.4/decode_data.bend as D def checked(raw:D.Raw) -> Checked: match raw: case D.Number{value}:Value{value} case D.SignedInteger{negative,+magnitude}:signed((Bool.not(negative) || Nat.is_eq(magnitude,0n)) && Nat.is_le(magnitude,4294967295n),magnitude) case D.Float{value}:normalized(D.float_numeric(F32.bits(value))) case D.Binary64{high,low}:normalized(D.binary_numeric(high,low)) case _:Invalid{} Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.bits https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_le https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/decode_data.bend&name=Raw https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/decode_data.bend&name=binary_numeric https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/decode_data.bend&name=float_numeric https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/restore_raw_number.bend&name=Checked https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/restore_raw_number.bend&name=normalized https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/restore_raw_number.bend&name=signed