mirror of https://github.com/ppy/osu
Use float methods for math operations
This commit is contained in:
parent
b1f2bdd579
commit
538973e394
|
@ -183,8 +183,8 @@ private static Vector2 rotatePointAroundOrigin(Vector2 point, Vector2 origin, fl
|
|||
point.Y -= origin.Y;
|
||||
|
||||
Vector2 ret;
|
||||
ret.X = (float)(point.X * Math.Cos(MathUtils.DegreesToRadians(angle)) + point.Y * Math.Sin(angle / 180f * Math.PI));
|
||||
ret.Y = (float)(point.X * -Math.Sin(MathUtils.DegreesToRadians(angle)) + point.Y * Math.Cos(angle / 180f * Math.PI));
|
||||
ret.X = point.X * MathF.Cos(MathUtils.DegreesToRadians(angle)) + point.Y * MathF.Sin(angle / 180f * MathF.PI);
|
||||
ret.Y = point.X * -MathF.Sin(MathUtils.DegreesToRadians(angle)) + point.Y * MathF.Cos(angle / 180f * MathF.PI);
|
||||
|
||||
ret.X += origin.X;
|
||||
ret.Y += origin.Y;
|
||||
|
|
Loading…
Reference in New Issue