pub fn fitsInTwosComp(self: Const, signedness: Signedness, bit_count: usize) bool self: Constsignedness: Signednessbit_count: usize2304
2305
2306
2307
2308
2309
2310
2311
2312 pub fn fitsInTwosComp(self: Const, signedness: Signedness, bit_count: usize) bool {
if (self.eqlZero()) {
return true;
}
if (signedness == .unsigned and !self.positive) {
return false;
}
return bit_count >= self.bitCountTwosCompForSignedness(signedness);
}