Пример #1
0
        public Angle(Vector2 a, Vector2 b)
        {
            // get rad angle
            // the value is -3 to 3
            rad  = Calculus.angleFrom(a, b);
            deg  = Calculus.RadianToDegree(rad);
            aPos = a;
            bPos = b;

            if (rad < 0)
            {
                rad += Math.PI * 2;
            }

            deg = Calculus.RadianToDegree(rad);
        }
Пример #2
0
 public void Update(double val)
 {
     this.rad = val;
     this.deg = Calculus.RadianToDegree(val);
 }