示例#1
0
 public static Vector2 SetValues(this Vector2 vector, Vector2 values, VectorAxesMask vectorAxesMask)
 {
     if ((vectorAxesMask & VectorAxesMask.X) != VectorAxesMask.None)
     {
         vector.x = values.x;
     }
     if ((vectorAxesMask & VectorAxesMask.Y) != VectorAxesMask.None)
     {
         vector.y = values.y;
     }
     return(vector);
 }
示例#2
0
 public static Vector3 SetValues(this Vector3 vector, float value, VectorAxesMask vectorAxesMask)
 {
     return(vector.SetValues(new Vector3(value, value, value), vectorAxesMask));
 }