Код: Выделить всё
Vector2 pixelpos = new Vector2(x, y);
Vector2 center = new Vector2(t.Width / 2, t.Height / 2);
Vector2 pixelposWorld = (pixelpos - center);
float rotation = (float)Math.Atan2(pixelposWorld.Y, pixelposWorld.X);
float rotationPercent = (MathHelper.ToDegrees(rotation) / 360);
В настоящее время RotationPercent имеет только версию 1.0.
Что я могу сделать, чтобы это исправить?
Подробнее здесь: https://stackoverflow.com/questions/820 ... -direction