예제 #1
0
 public static float GetAngleBetweenPoints(Vector2 A, Vector2 B)
 {
     return(EngineMathHelper.Mod(MathHelper.ToDegrees((float)Math.Atan2(A.Y - B.Y, A.X - B.X)), 360));
 }
예제 #2
0
 private Angle(float radians)
 {
     this.radians = EngineMathHelper.Mod(radians, MathHelper.Pi * 2);
 }
예제 #3
0
        public static Angle Lerp(Angle fromAngle, Angle toAngle, float delta)
        {
            float degrees = EngineMathHelper.AngleLerp(fromAngle.Degrees, toAngle.Degrees, delta);

            return(FromDegrees(degrees));
        }
예제 #4
0
 private float BindTo360(float val)
 {
     return(EngineMathHelper.Mod(val, 360));
 }