07.10.2020

+ Parent, Name and Flags to objects.

~ Improved Matrix calculations
This commit is contained in:
Michel Fedde 2020-10-08 12:25:20 +02:00
parent f865496414
commit 2c00dbd31a
21 changed files with 383 additions and 42 deletions

View file

@ -0,0 +1,20 @@
using System;
using OpenTK;
namespace SM.Utility
{
/// <summary>
/// Utilitys for rotations
/// </summary>
public class RotationUtility
{
/// <summary>
/// Angle towards an coordinate.
/// </summary>
/// <returns></returns>
public static float TurnTowards(Vector2 origin, Vector2 target)
{
return MathHelper.RadiansToDegrees((float)Math.Atan2(target.Y - origin.Y, target.X - origin.X));
}
}
}