headYaw rot changes

This commit is contained in:
GameHerobrine 2023-02-23 00:41:01 +03:00
parent 1b0366802f
commit 447638816e
5 changed files with 26 additions and 16 deletions

View file

@ -39,10 +39,16 @@ class Utils{
return $id;
}
public static function wrapAngleTo180_float($par0)
public static function wrapAngleTo360($angle)
{
$par0 %= 360.0;
return $par0 >= 180 ? $par0 - 360 : (($par0 < -180) ? ($par0 + 360) : $par0);
$angle %= 360;
return $angle < 0 ? $angle + 360 : $angle;
}
public static function wrapAngleTo180($angle)
{
$angle = fmod($angle+180, 360);
return $angle < 0 ? $angle + 360 : $angle - 180;
}
public static function getSign($v){