mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Fix half of 45 degree sprite issues
This commit is contained in:
@@ -87,7 +87,7 @@ namespace Robust.Shared.Maths
|
||||
var ang = Theta % (2 * Math.PI);
|
||||
|
||||
if (ang < 0.0f) // convert -PI > PI to 0 > 2PI
|
||||
ang += 2 * (float) Math.PI;
|
||||
ang += 2 * Math.PI;
|
||||
|
||||
return (Direction) (Math.Floor((ang + CardinalOffset) / CardinalSegment) * 2 % 8);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user