mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
small changes to entity ai(again =/)
This commit is contained in:
parent
c29d8dab9d
commit
978447cdbb
9 changed files with 44 additions and 41 deletions
|
|
@ -38,6 +38,15 @@ class Utils{
|
|||
}
|
||||
return $id;
|
||||
}
|
||||
|
||||
public static function getSign($v){
|
||||
return $v > 0 ? 1 : ($v < 0 ? -1 : 0);
|
||||
}
|
||||
|
||||
public static function clampDegrees($v){
|
||||
return floor(($v % 360 + 360) % 360);
|
||||
}
|
||||
|
||||
public static function hasEmoji($s){
|
||||
return preg_match(Utils::emojiRegex, $s, $matches);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue