FixedPointValue.withSignedness constructor
- required LogicValue integer,
- required LogicValue fraction,
- bool signed = true,
Constructs FixedPointValue from integer and fraction values with a
signed option to interpret the MSB of integer as a two's-complement
sign bit.
Implementation
factory FixedPointValue.withSignedness(
{required LogicValue integer,
required LogicValue fraction,
bool signed = true}) =>
populatorWithSignedness(
integerWidth: integer.width - (signed ? 1 : 0),
fractionWidth: fraction.width,
signed: signed)
.populate(integer: integer, fraction: fraction);