[Mono] Make Sign methods consistent with GDScript and System.Math

This commit is contained in:
Aaron Franke 2019-12-16 23:36:59 -05:00
parent 71d372a8ab
commit 0b3f1cc70a
No known key found for this signature in database
GPG key ID: 40A1750B977E56BF

View file

@ -266,12 +266,14 @@ namespace Godot
public static int Sign(int s)
{
if (s == 0) return 0;
return s < 0 ? -1 : 1;
}
public static real_t Sign(real_t s)
public static int Sign(real_t s)
{
return s < 0f ? -1f : 1f;
if (s == 0) return 0;
return s < 0 ? -1 : 1;
}
public static real_t Sin(real_t s)