1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

math: sign function (#10014)

This commit is contained in:
Cabral
2021-05-08 08:32:18 -03:00
committed by GitHub
parent 68c8709343
commit b5afa049e9
3 changed files with 68 additions and 2 deletions

View File

@ -37,7 +37,7 @@ pub const (
min_i16 = -32768
max_i32 = 2147483647
min_i32 = -2147483648
// -9223372036854775808 is wrong because C compilers parse litteral values
// -9223372036854775808 is wrong because C compilers parse literal values
// without sign first, and 9223372036854775808 overflows i64, hence the
// consecutive subtraction by 1
min_i64 = i64(-9223372036854775807 - 1)