mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 20:19:44 +00:00
real head yaw fixed
This commit is contained in:
parent
9d6322f587
commit
88cec22404
4 changed files with 41 additions and 10 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue