mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
hopefully fixed yaw/pitch rotation + new ai task can be randomly executed now
This commit is contained in:
parent
1b85ffd4c6
commit
d9c096357a
7 changed files with 69 additions and 44 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue