hopefully fixed yaw/pitch rotation + new ai task can be randomly executed now

This commit is contained in:
GameHerobrine 2022-12-20 19:23:21 +03:00
parent 1b85ffd4c6
commit d9c096357a
7 changed files with 69 additions and 44 deletions

View file

@ -39,6 +39,12 @@ class Utils{
return $id;
}
public static function wrapAngleTo180_float($par0)
{
$par0 %= 360.0;
return $par0 >= 180 ? $par0 - 360 : ($par0 + 360);
}
public static function getSign($v){
return $v > 0 ? 1 : ($v < 0 ? -1 : 0);
}