Exemple #1
0
        public void Neg()
        {
            var vector = new Vector2(1, 2);

            vector.Neg();
            Assert.AreEqual(new Vector2(-1, -2), vector);
        }
Exemple #2
0
        public static Vector2 operator -(Vector2 vector)
        {
            var v = new Vector2(vector);

            v.Neg();
            return(v);
        }
Exemple #3
0
 public void Neg()
 {
     var vector = new Vector2(1, 2);
       vector.Neg();
       Assert.AreEqual(new Vector2(-1, -2), vector);
 }
Exemple #4
0
 public static Vector2 operator -(Vector2 vector)
 {
     var v = new Vector2(vector);
       v.Neg();
       return v;
 }