Created
November 6, 2023 12:06
-
-
Save ruan65/593304f0ec05edb0859ca947486a74c1 to your computer and use it in GitHub Desktop.
Dart max min integer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int maxInteger = double.maxFinite.toInt(); | |
const maxInteger2 = -1 >>> 1; // 1111 ... 1111 >>> 0111 ... 1111 | |
print(maxInteger); | |
print(maxInteger2); | |
print(-maxInteger); | |
print(-maxInteger2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment