real head yaw fixed

This commit is contained in:
GameHerobrine 2024-01-09 08:51:15 +03:00
parent 9d6322f587
commit 88cec22404
4 changed files with 41 additions and 10 deletions

View file

@ -69,8 +69,11 @@ class Utils{
public static function wrapAngleTo180($angle)
{
$angle = fmod($angle+180, 360);
return $angle < 0 ? $angle + 360 : $angle - 180;
$angle = fmod($angle, 360);
if($angle >= 180) $angle -= 360;
if($angle < -180) $angle += 360;
return $angle;
}
public static function getSign($v){
return $v <=> 0;