Deozaan

Vector3 Extension Methods

Nov 27th, 2014
392
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.34 KB | None | 0 0
  1.     #region Vector3 extensions
  2.  
  3.     public static Vector3 SetX(this Vector3 v3, float x) {
  4.         return new Vector3(x, v3.y, v3.z);
  5.     }
  6.  
  7.     public static Vector3 SetY(this Vector3 v3, float y) {
  8.         return new Vector3(v3.x, y, v3.z);
  9.     }
  10.  
  11.     public static Vector3 SetZ(this Vector3 v3, float z) {
  12.         return new Vector3(v3.x, v3.y, z);
  13.     }
  14.  
  15.     #endregion //Vector3 extensions
Advertisement
Add Comment
Please, Sign In to add comment