ofInt method

SmvType ofInt(
  1. int intValue
)

Populates a SignMagnitudeValue from an integer intValue.

Implementation

SmvType ofInt(int intValue) {
  final sign = LogicValue.ofBool(intValue < 0);
  final magnitude = LogicValue.ofInt(intValue.abs(), width);
  return populate(sign: sign, magnitude: magnitude);
}