Re-bind posmod, use int64_t instead of int

Fixes #48420, fixes #48421.
The binding was missed when moving GDScript built-in to Global Scope it seems.

Co-authored-by: kleonc <9283098+kleonc@users.noreply.github.com>
This commit is contained in:
Rémi Verschelde 2021-05-04 12:51:03 +02:00
parent 4e7ca279fc
commit e196733e88
No known key found for this signature in database
GPG key ID: C3336907360768E1
4 changed files with 33 additions and 3 deletions

View file

@ -218,8 +218,8 @@ public:
return value;
}
static _ALWAYS_INLINE_ int posmod(int p_x, int p_y) {
int value = p_x % p_y;
static _ALWAYS_INLINE_ int64_t posmod(int64_t p_x, int64_t p_y) {
int64_t value = p_x % p_y;
if ((value < 0 && p_y > 0) || (value > 0 && p_y < 0)) {
value += p_y;
}