public static int ToIntegerFromCanonicalChecked(this bool canonical) { _ = checked (unchecked ((uint)(int)(-1)) + unchecked ((uint)canonical.AsIntegerUnsafe())); return(canonical.AsIntegerUnsafe()); }
public static int ToIntegerFromCanonical(this bool canonical) { System.Diagnostics.Debug.Assert(unchecked ((uint)canonical.AsIntegerUnsafe()) <= 1); return(canonical.AsIntegerUnsafe()); }