Esempio n. 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));
 }
Esempio n. 2
0
 private Angle(float radians)
 {
     this.radians = EngineMathHelper.Mod(radians, MathHelper.Pi * 2);
 }
Esempio n. 3
0
        public static Angle Lerp(Angle fromAngle, Angle toAngle, float delta)
        {
            float degrees = EngineMathHelper.AngleLerp(fromAngle.Degrees, toAngle.Degrees, delta);

            return(FromDegrees(degrees));
        }
Esempio n. 4
0
 private float BindTo360(float val)
 {
     return(EngineMathHelper.Mod(val, 360));
 }