コード例 #1
0
 /// <summary>
 /// Initialization from Vector4i instance.
 /// </summary>
 public Vector3i(Vector4i v)
 {
     x = v.x;
     y = v.y;
     z = v.z;
 }
コード例 #2
0
 /// <summary>
 /// Return clamped version of specified vector with min/max range.
 /// </summary>
 /// <param name="value">Source vector.</param>
 /// <param name="min">Min value.</param>
 /// <param name="max">Max value.</param>
 public static Vector4i Clamp(Vector4i value, Vector4i min, Vector4i max)
 {
     return(new Vector4i(Mathf.Clamp(value.x, min.x, max.x), Mathf.Clamp(value.y, min.y, max.y),
                         Mathf.Clamp(value.z, min.z, max.z), Mathf.Clamp(value.w, min.w, max.w)));
 }
コード例 #3
0
 /// <summary>
 /// Initialization from Vector4i instance.
 /// </summary>
 public Vector2i(Vector4i v)
 {
     x = v.x;
     y = v.y;
 }
コード例 #4
0
 /// <summary>
 /// Combine new Vector4i from min values of two vectors.
 /// </summary>
 /// <param name="lhs">First vector.</param>
 /// <param name="rhs">Second vector.</param>
 public static Vector4i Min(Vector4i lhs, Vector4i rhs)
 {
     return(new Vector4i(lhs.x < rhs.x ? lhs.x : rhs.x, lhs.x < rhs.x ? lhs.y : rhs.y,
                         lhs.z < rhs.z ? lhs.z : rhs.z, lhs.w < rhs.w ? lhs.w : rhs.w));
 }
コード例 #5
0
 /// <summary>
 /// Combine new Vector4i from max values of two vectors.
 /// </summary>
 /// <param name="lhs">First vector.</param>
 /// <param name="rhs">Second vector.</param>
 public static Vector4i Max(Vector4i lhs, Vector4i rhs)
 {
     return(new Vector4i(lhs.x > rhs.x ? lhs.x : rhs.x, lhs.x > rhs.x ? lhs.y : rhs.y,
                         lhs.z > rhs.z ? lhs.z : rhs.z, lhs.w > rhs.w ? lhs.w : rhs.w));
 }
コード例 #6
0
 /// <summary>
 /// Initialization from Vector4i instance.
 /// </summary>
 public Vector3i(Vector4i v)
 {
     x = v.x;
     y = v.y;
     z = v.z;
 }
コード例 #7
0
 /// <summary>
 /// Combine new Vector4i from min values of two vectors.
 /// </summary>
 /// <param name="lhs">First vector.</param>
 /// <param name="rhs">Second vector.</param>
 public static Vector4i Min(Vector4i lhs, Vector4i rhs)
 {
     return new Vector4i (lhs.x < rhs.x ? lhs.x : rhs.x, lhs.x < rhs.x ? lhs.y : rhs.y,
                          lhs.z < rhs.z ? lhs.z : rhs.z, lhs.w < rhs.w ? lhs.w : rhs.w);
 }
コード例 #8
0
 /// <summary>
 /// Combine new Vector4i from max values of two vectors.
 /// </summary>
 /// <param name="lhs">First vector.</param>
 /// <param name="rhs">Second vector.</param>
 public static Vector4i Max(Vector4i lhs, Vector4i rhs)
 {
     return new Vector4i (lhs.x > rhs.x ? lhs.x : rhs.x, lhs.x > rhs.x ? lhs.y : rhs.y,
                          lhs.z > rhs.z ? lhs.z : rhs.z, lhs.w > rhs.w ? lhs.w : rhs.w);
 }
コード例 #9
0
 /// <summary>
 /// Return clamped version of specified vector with min/max range.
 /// </summary>
 /// <param name="value">Source vector.</param>
 /// <param name="min">Min value.</param>
 /// <param name="max">Max value.</param>
 public static Vector4i Clamp(Vector4i value, Vector4i min, Vector4i max)
 {
     return new Vector4i (Mathf.Clamp (value.x, min.x, max.x), Mathf.Clamp (value.y, min.y, max.y),
                          Mathf.Clamp (value.z, min.z, max.z), Mathf.Clamp (value.w, min.w, max.w));
 }
コード例 #10
0
 /// <summary>
 /// Initialization from Vector4i instance.
 /// </summary>
 public Vector2i(Vector4i v)
 {
     x = v.x;
     y = v.y;
 }