TypeUfixed constructor

TypeUfixed(
  1. int size,
  2. int precision
)

Implementation

factory TypeUfixed(int size, int precision) {
  if (size < 8 || size > 512 || size % 8 != 0) {
    throw ArgumentError(
        'uint initialize failure: bitSize should be in [8, 512] and bitSize '
        'mod 8 == 0');
  }
  if (precision < 1 || precision > 160) {
    throw ArgumentError(
        'ufixed initialize failure: precision should be in [1, 160]');
  }

  return TypeUfixed._internal(size, precision);
}